mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-26 07:44:56 +01:00
Change mousewheel handling so we let the default
event happen if we are outside the container.
This commit is contained in:
parent
42148c0d2e
commit
e5891636b3
@ -109,6 +109,16 @@ mindplot.Designer = new Class({
|
|||||||
|
|
||||||
|
|
||||||
$(document).addEvent('mousewheel', function(event) {
|
$(document).addEvent('mousewheel', function(event) {
|
||||||
|
var containerCoords = screenManager.getContainer().getCoordinates();
|
||||||
|
if (event.client.y < containerCoords.top ||
|
||||||
|
event.client.y > containerCoords.bottom ||
|
||||||
|
event.client.x < containerCoords.left ||
|
||||||
|
event.client.x > containerCoords.right
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
if (event.wheel > 0) {
|
if (event.wheel > 0) {
|
||||||
this.zoomIn(1.05);
|
this.zoomIn(1.05);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user