2
0
Эх сурвалжийг харах

allow to disable global events with attribute on canvas

ncannasse 7 жил өмнө
parent
commit
0824ec6c11
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      hxd/Window.js.hx

+ 2 - 0
hxd/Window.js.hx

@@ -34,6 +34,8 @@ class Window {
 		if( canvas == null ) {
 			canvas = cast js.Browser.document.getElementById("webgl");
 			if( canvas == null ) throw "Missing canvas #webgl";
+			if( canvas.getAttribute("globalEvents") == "0" )
+				element = canvas;
 		}
 		this.canvas = canvas;
 		canvasPos = canvas.getBoundingClientRect();