Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not update the camera position automatically for single object scene #559

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Do not update the camera position automatically for single object scene
martinRenou committed Nov 5, 2024

Verified

This commit was signed with the committer’s verified signature.
radoering Randy Döring
commit ecc63e98945e05a35f8347ab0f5fec7422bdab2b
6 changes: 2 additions & 4 deletions packages/base/src/3dview/mainview.tsx
Original file line number Diff line number Diff line change
@@ -782,10 +782,8 @@ export class MainView extends React.Component<IProps, IStates> {
}
});

// Update the reflength. We will update the camera position accordingly if there is a single object.
this._updateRefLength(
this._meshGroup.children.length === 1 || this._refLength === null
);
// Update the reflength.
this._updateRefLength(this._refLength === null);
// Set the expoded view if it's enabled
this._setupExplodedView();


Unchanged files with check annotations Beta

expect(errors).toBe(0);
const main = await page.$('#jp-main-split-panel');
if (main) {
expect(await main.screenshot()).toMatchSnapshot({

Check failure on line 170 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:141:9 › UI Test › File operator test › Should be able to remove object

1) tests/ui.spec.ts:141:9 › UI Test › File operator test › Should be able to remove object ─────── Error: Screenshot comparison failed: 57278 pixels (ratio 0.04 of all image pixels) are different. Expected: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts-snapshots/Operator-Remove-test-jcad-linux.png Received: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-File-oper-ec544-ld-be-able-to-remove-object/Operator-Remove-test-jcad-actual.png Diff: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-File-oper-ec544-ld-be-able-to-remove-object/Operator-Remove-test-jcad-diff.png 168 | const main = await page.$('#jp-main-split-panel'); 169 | if (main) { > 170 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 171 | name: `Operator-Remove-${fileName}.png`, 172 | maxDiffPixelRatio: 0.01 173 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts:170:41

Check failure on line 170 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:141:9 › UI Test › File operator test › Should be able to remove object

1) tests/ui.spec.ts:141:9 › UI Test › File operator test › Should be able to remove object ─────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 57278 pixels (ratio 0.04 of all image pixels) are different. Expected: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts-snapshots/Operator-Remove-test-jcad-linux.png Received: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-File-oper-ec544-ld-be-able-to-remove-object-retry1/Operator-Remove-test-jcad-actual.png Diff: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-File-oper-ec544-ld-be-able-to-remove-object-retry1/Operator-Remove-test-jcad-diff.png 168 | const main = await page.$('#jp-main-split-panel'); 169 | if (main) { > 170 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 171 | name: `Operator-Remove-${fileName}.png`, 172 | maxDiffPixelRatio: 0.01 173 | }); at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts:170:41
name: `Operator-Remove-${fileName}.png`,
maxDiffPixelRatio: 0.01
});
await page.sidebar.close('left');
await page.waitForTimeout(500);
if (main) {
expect(await main.screenshot()).toMatchSnapshot({

Check failure on line 310 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:280:11 › UI Test › JCAD creation test › Extension activation test › should create a CAD File

2) tests/ui.spec.ts:280:11 › UI Test › JCAD creation test › Extension activation test › should create a CAD File Error: Screenshot comparison failed: 173368 pixels (ratio 0.26 of all image pixels) are different. Expected: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Modified-linux.png Received: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-JCAD-crea-0664a-st-should-create-a-CAD-File/JCAD-Modified-actual.png Diff: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-JCAD-crea-0664a-st-should-create-a-CAD-File/JCAD-Modified-diff.png 308 | await page.waitForTimeout(500); 309 | if (main) { > 310 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 311 | name: `JCAD-Modified.png` 312 | }); 313 | } at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts:310:43

Check failure on line 310 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:280:11 › UI Test › JCAD creation test › Extension activation test › should create a CAD File

2) tests/ui.spec.ts:280:11 › UI Test › JCAD creation test › Extension activation test › should create a CAD File Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 173388 pixels (ratio 0.26 of all image pixels) are different. Expected: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Modified-linux.png Received: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-JCAD-crea-0664a-st-should-create-a-CAD-File-retry1/JCAD-Modified-actual.png Diff: /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/test-results/tests-ui-UI-Test-JCAD-crea-0664a-st-should-create-a-CAD-File-retry1/JCAD-Modified-diff.png 308 | await page.waitForTimeout(500); 309 | if (main) { > 310 | expect(await main.screenshot()).toMatchSnapshot({ | ^ 311 | name: `JCAD-Modified.png` 312 | }); 313 | } at /home/runner/work/JupyterCAD/JupyterCAD/ui-tests/tests/ui.spec.ts:310:43
name: `JCAD-Modified.png`
});
}