Finally get Firefox and Chrome to wheel zoom in the same manner...

pull/228/head
Dave C-J 2014-05-14 17:41:04 +01:00
parent e0971d96c6
commit 3ba6ad07b7
1 changed files with 7 additions and 7 deletions

View File

@ -522,13 +522,13 @@ RED.view = function() {
$('#btn-zoom-zero').click(function() {zoomZero();});
$('#btn-zoom-in').click(function() {zoomIn();});
$("#chart").on('DOMMouseScroll mousewheel', function (evt) {
if ( evt.altKey ) {
evt.preventDefault();
evt.stopPropagation();
var move = evt.originalEvent.detail || evt.originalEvent.wheelDelta;
if (move <= 0) { zoomOut(); }
else { zoomIn(); }
}
if ( evt.altKey ) {
evt.preventDefault();
evt.stopPropagation();
var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta;
if (move <= 0) { zoomOut(); }
else { zoomIn(); }
}
});
$("#chart").droppable({
accept:".palette_node",