Change Cocos engine to allow mouse wheel events to propagate to page

Change Cocos engine to allow mouse wheel events to propagate to page
0

I want the mouse wheel events occur on the game to propagate into the web page.
I modified following section in “cocos2d-js.js”

var _mouseWheelHandler = function(event) {

var pos = event.getLocation();
var node = this.owner;
if (node._hitTest(pos, this)) {
false;
event.type = EventType.MOUSE_WHEEL;
event.bubbles = true;
node.dispatchEvent(event);
false;
////event.stopPropagation();
}
};

But I am still not getting wheel events on the web-page.
Is there any other changes I have to do?

1 Like