mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02: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 () {
|
||||
var workspace = this._workspace;
|
||||
var screenManager = workspace.getScreenManager();
|
||||
|
||||
var me = this;
|
||||
// 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
|
||||
//event happen if we are outside the container.
|
||||
var coords = screenManager.getContainer()[0].getCoordinates();
|
||||
// event happen if we are outside the container. -> FIXME: it still happening?
|
||||
/*var coords = screenManager.getContainer().getCoordinates();
|
||||
var isOutsideContainer = event.client.y < coords.top ||
|
||||
event.client.y > coords.bottom ||
|
||||
event.client.x < coords.left ||
|
||||
@ -100,8 +99,15 @@ mindplot.Designer = new Class({
|
||||
this.zoomOut(1.05);
|
||||
}
|
||||
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