Skip to content

Commit c81cc3e

Browse files
munozcojourdain
authored andcommitted
fix(remote): remove fallback render window size
If render window size has not been set, do not force resize it, as it defaults to a wrong size.
1 parent 42b5d01 commit c81cc3e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/remote.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ export class RemoteSession {
387387
// Bump local mtime and process states to reflect server state
388388
try {
389389
this.sceneManager.updateObjectsFromStates();
390-
const [w, h] = this.renderWindowSizes[vtkId] || [10, 10];
391-
this.sceneManager.setSize(vtkId, w, h);
390+
if (vtkId in this.renderWindowSizes) {
391+
const [w, h] = this.renderWindowSizes[vtkId];
392+
this.sceneManager.setSize(vtkId, w, h);
393+
}
392394

393395
// Prevent state patching with new API
394396
if (bindCanvas && this.sceneManager.bindRenderWindow) {

0 commit comments

Comments
 (0)