changeset 544:11510f92cc38 dev

passive events
author Alain Mazy <alain@mazy.be>
date Mon, 25 Mar 2019 15:23:45 +0100
parents 75664eeacae5
children e1ba16436d59
files Platforms/Wasm/wasm-viewport.ts
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Platforms/Wasm/wasm-viewport.ts	Wed Mar 20 15:27:04 2019 +0100
+++ b/Platforms/Wasm/wasm-viewport.ts	Mon Mar 25 15:23:45 2019 +0100
@@ -235,7 +235,7 @@
         var y = event.pageY - this.offsetTop;
         that.ViewportMouseWheel(that.pimpl_, event.deltaY, x, y, event.ctrlKey);
         event.preventDefault();
-      });
+      }, {passive: true});
 
       this.htmlCanvas_.addEventListener('touchstart', function(event: TouchEvent) {
         // don't propagate events to the whole body (this could zoom the entire page instead of zooming the viewport)
@@ -263,7 +263,7 @@
         }
 
         that.ViewportTouchStart(that.pimpl_, event.targetTouches.length, x0, y0, x1, y1, x2, y2);
-      });
+      }, {passive: true});
     
       this.htmlCanvas_.addEventListener('touchend', function(event) {
         // don't propagate events to the whole body (this could zoom the entire page instead of zooming the viewport)
@@ -369,7 +369,7 @@
                                   z0[1], 0);
           }        
         }
-      });
+      }, {passive: true});
     }  
 
   public ResetTouch() {