Change mousewheel handling so we let the default

event happen if we are outside the container.
This commit is contained in:
Tarjei Huse 2012-03-14 20:34:29 +01:00
parent 42148c0d2e
commit e5891636b3

View File

@ -109,6 +109,16 @@ mindplot.Designer = new Class({
$(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) {
this.zoomIn(1.05);
}