Преглед на файлове

add an api function to handle viewer resize

Yana Rose преди 4 години
родител
ревизия
93644ac3f9
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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();
+    }
 }