![]() |
#1 |
Registered User
Join Date: Dec 2013
Posts: 19
|
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
<canvas id='canvas1' width="512px" height="512px" style='top:0px;right:0px;' > </canvas> 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; }
__________________
Developpement d'application android | Société d'applications mobile | Developpement d'application iphone |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to move my site to a new domain? | eigeehte | Hosting Discussion | 8 | 07-08-2015 10:31 AM |
Move to HostGator? | mjvndhsb | Hosting Discussion | 7 | 09-13-2014 02:17 PM |
What is the difference between an event planner and an event producer? | jackthomas087 | General Discussion | 0 | 06-18-2014 03:35 AM |
Custom Event Games Summary's | skwmk2012 | General Discussion | 6 | 12-13-2013 01:08 AM |
eUKhost is celebrating the Olympics 2012 Event & Appeals To Join The Celebrations ! | Asher ross | Post your ad here | 0 | 07-31-2012 05:46 AM |