Browse Source

add an api function to handle viewer resize

Yana Rose 4 years ago
parent
commit
93644ac3f9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/viewer/index.ts

+ 4 - 0
src/viewer/index.ts

@@ -212,4 +212,8 @@ export class Viewer {
     async loadStructureFromData(data: string | number[], format: BuiltInTrajectoryFormat, isBinary: boolean, props?: PresetProps & { dataLabel?: string }, matrix?: Mat4) {
         return this.customState.modelLoader.parse({ data, format, isBinary }, props, matrix);
     }
+
+    handleResize() {
+        this.plugin.layout.events.updated.next();
+    }
 }