9 years ago by denkle
input.js LINE 172
mousemove: function( event ) { var internalWidth = parseInt(ig.system.canvas.offsetWidth) || ig.system.realWidth; var internalHeight = parseInt(ig.system.canvas.offsetHeight) || ig.system.realHeight; var sx = ig.system.scale * (internalWidth / ig.system.realWidth); var sy = ig.system.scale * (internalHeight / ig.system.realHeight); var pos = {left: 0, top: 0}; if( ig.system.canvas.getBoundingClientRect ) { pos = ig.system.canvas.getBoundingClientRect(); } var ev = event.touches ? event.touches[0] : event; this.mouse.x = (ev.clientX - pos.left) / sx; this.mouse.y = (ev.clientY - pos.top) / sy; },