diff Platforms/Wasm/wasm-viewport.ts @ 314:97f16214dc5e am-2

cleanup
author am@osimis.io
date Wed, 03 Oct 2018 17:14:17 +0200
parents 8bdc6112bc2e
children 8716176ff7f0
line wrap: on
line diff
--- a/Platforms/Wasm/wasm-viewport.ts	Wed Oct 03 17:01:05 2018 +0200
+++ b/Platforms/Wasm/wasm-viewport.ts	Wed Oct 03 17:14:17 2018 +0200
@@ -19,7 +19,7 @@
   var canvasId = UTF8ToString(htmlCanvasId);
   var webViewport = new Stone.WasmViewport(StoneFrameworkModule, canvasId, cppViewportHandle);  // viewports are stored in a static map in WasmViewport -> won't be deleted
   webViewport.Initialize();
-  
+
   return cppViewportHandle;
 }
 
@@ -103,6 +103,12 @@
       return undefined;
     }
 
+    public static ResizeAll() {
+      for (let canvasId in WasmViewport.viewportsMapByCanvasId_) {
+        WasmViewport.viewportsMapByCanvasId_[canvasId].Resize();
+      }
+    }
+
     public Redraw() {
       if (this.imageData_ === null ||
           this.renderingBuffer_ === null ||