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

allow to disable global events with attribute on canvas

ncannasse 7 жил өмнө
parent
commit
0824ec6c11

+ 2 - 0
hxd/Window.js.hx

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