Преглед изворни кода

allow to disable global events with attribute on canvas

ncannasse пре 7 година
родитељ
комит
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();