Skip to content

Commit

Permalink
Merge pull request #12 from lysaght/master
Browse files Browse the repository at this point in the history
Fix zoom direction
  • Loading branch information
etimberg authored Jun 12, 2016
2 parents 8efb9f8 + 4396f1b commit ffe0efb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chart.zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var helpers = Chart.helpers;
var zoomNS = Chart.Zoom = Chart.Zoom || {};

// Where we store functions to handle different scale types
var zoomFunctions = zoomNS.zoomFunctions = zoomNSzoomFunctions || {};
var zoomFunctions = zoomNS.zoomFunctions = zoomNS.zoomFunctions || {};
var panFunctions = zoomNS.panFunctions = zoomNS.panFunctions || {};

// Default options if none are provided
Expand Down Expand Up @@ -181,7 +181,7 @@ var zoomPlugin = {
var panThreshold = helpers.getValueOrDefault(options.pan ? options.pan.threshold : undefined, zoomNS.defaults.pan.threshold);

var wheelHandler = function(e) {
if (e.deltaY > 0) {
if (e.deltaY < 0) {
doZoom(chartInstance, 1.1);
} else {
doZoom(chartInstance, 0.909);
Expand Down

0 comments on commit ffe0efb

Please sign in to comment.