diff Platforms/WebAssembly/wasm-viewport.ts @ 230:7d2631320615 am

wasm-application.js is now in ts
author am@osimis.io
date Thu, 14 Jun 2018 17:14:10 +0200
parents b0ba3b38a23c
children 5027cb2feb51
line wrap: on
line diff
--- a/Platforms/WebAssembly/wasm-viewport.ts	Thu Jun 14 16:51:43 2018 +0200
+++ b/Platforms/WebAssembly/wasm-viewport.ts	Thu Jun 14 17:14:10 2018 +0200
@@ -1,17 +1,16 @@
-
-  var isPendingRedraw = false;
+var isPendingRedraw = false;
 
-  function ScheduleWebViewportRedraw(cppViewportHandle: any) : void
-  {
-    if (!isPendingRedraw) {
-      isPendingRedraw = true;
-      console.log('Scheduling a refresh of the viewport, as its content changed');
-      window.requestAnimationFrame(function() {
-        isPendingRedraw = false;
-        Stone.WasmViewport.GetFromCppViewport(cppViewportHandle).Redraw();
-      });
-    }
+function ScheduleWebViewportRedraw(cppViewportHandle: any) : void
+{
+  if (!isPendingRedraw) {
+    isPendingRedraw = true;
+    console.log('Scheduling a refresh of the viewport, as its content changed');
+    window.requestAnimationFrame(function() {
+      isPendingRedraw = false;
+      Stone.WasmViewport.GetFromCppViewport(cppViewportHandle).Redraw();
+    });
   }
+}
 
 module Stone {