mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
fix scrollbar zoom in / zoom out
This commit is contained in:
parent
f3dff1b1e6
commit
4b3a00f2e8
@ -80,13 +80,12 @@ mindplot.Designer = new Class({
|
|||||||
|
|
||||||
_registerWheelEvents:function () {
|
_registerWheelEvents:function () {
|
||||||
var workspace = this._workspace;
|
var workspace = this._workspace;
|
||||||
var screenManager = workspace.getScreenManager();
|
var me = this;
|
||||||
|
|
||||||
// Zoom In and Zoom Out must active event
|
// Zoom In and Zoom Out must active event
|
||||||
$(document).bind('mousewheel', function (event) {
|
$(document).on('mousewheel', function (event) {
|
||||||
// Change mousewheel handling so we let the default
|
// Change mousewheel handling so we let the default
|
||||||
//event happen if we are outside the container.
|
// event happen if we are outside the container. -> FIXME: it still happening?
|
||||||
var coords = screenManager.getContainer()[0].getCoordinates();
|
/*var coords = screenManager.getContainer().getCoordinates();
|
||||||
var isOutsideContainer = event.client.y < coords.top ||
|
var isOutsideContainer = event.client.y < coords.top ||
|
||||||
event.client.y > coords.bottom ||
|
event.client.y > coords.bottom ||
|
||||||
event.client.x < coords.left ||
|
event.client.x < coords.left ||
|
||||||
@ -100,8 +99,15 @@ mindplot.Designer = new Class({
|
|||||||
this.zoomOut(1.05);
|
this.zoomOut(1.05);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
}*/
|
||||||
|
if (event.deltaY > 0) {
|
||||||
|
me.zoomIn(1.05);
|
||||||
}
|
}
|
||||||
}.bind(this));
|
else {
|
||||||
|
me.zoomOut(1.05);
|
||||||
|
}
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user