View Single Post
Old 10-17-2014, 12:08 AM   #1
Mickyjames
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;

}
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Mickyjames is offline   Reply With Quote