![]() |
Fail to get mouse move event
I'm using google closure library and registering for click and mouse move event. I get the click event, however Mouse move event doesn't come. This is observed for Chrome browser, get the same event in Firefox
MyTest.virtualCanvas = function(){ this.destCanvas = document.getElementById('canvas1'); this.destCtx = this.destCanvas.getContext('2d'); this.getCallBackFn = this.highContrastFn.bind(this); this.mouseMoveBackFn = this.mouseMoveCB.bind(this); goog.events.listen(this.destCanvas, goog.events.EventType.CLICK, this.getCallBackFn); goog.events.listen(this.destCanvas, goog.events.EventType.MOUSEMOVE, this.mouseMoveBackFn); }; MyTest.virtualCanvas.prototype.mouseMoveCB = function(evt){ var x = evt.offsetX; var y = evt.offsetY; } MyTest.virtualCanvas.prototype.highContrastFn = function(evt){ var x = evt.offsetX; var y = evt.offsetY; } |
All times are GMT -7. The time now is 06:22 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.