Hi
I have a PlayCanvas project that manage this event:
this.app.mouse.on(pc.EVENT_MOUSEWHEEL, this.onMouseWheel, this);
So when I scroll, I can zoom-in / zoom-out in my application.
The problem is when I embed my PlayCanvas in an iFrame where the website page is long enough to have a scrollbar. If I scroll, the zoom out event will happend but the page will also scroll down!
This solution…:
MouseInput.prototype.onMouseWheel = function (event) {
event.event.preventDefault();
...
};
[…] doesn’t work because of this error:
So, my question is: How can I prevent the parent page to scroll if my mouse is hover the iframe (so hover the canvas that resize to 100% of the iframe)?