diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index ba7754b1..49b59c5c 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -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(); + }); }, /**