Merge pull request #1151 from videlais/patch-4

CocoonJS doesn't support mouse wheel
This commit is contained in:
Richard Davey 2014-08-31 00:09:07 +01:00
commit bc71d61734

View file

@ -222,13 +222,13 @@ Phaser.Mouse.prototype = {
this.game.canvas.addEventListener('mousedown', this._onMouseDown, true);
this.game.canvas.addEventListener('mousemove', this._onMouseMove, true);
this.game.canvas.addEventListener('mouseup', this._onMouseUp, true);
this.game.canvas.addEventListener('mousewheel', this._onMouseWheel, true);
this.game.canvas.addEventListener('DOMMouseScroll', this._onMouseWheel, true);
if (!this.game.device.cocoonJS)
{
this.game.canvas.addEventListener('mouseover', this._onMouseOver, true);
this.game.canvas.addEventListener('mouseout', this._onMouseOut, true);
this.game.canvas.addEventListener('mousewheel', this._onMouseWheel, true);
this.game.canvas.addEventListener('DOMMouseScroll', this._onMouseWheel, true);
}
},