浏览代码

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();
+    }
 }