diff --git a/package.json b/package.json index 01d9abc..be877c7 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ ], "dependencies": {}, "devDependencies": { - "chartist": "~0.9.0", + "chartist": "~0.9.7", "grunt": "^0.4.5", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-copy": "^0.7.0", diff --git a/src/scripts/chartist-plugin-zoom.js b/src/scripts/chartist-plugin-zoom.js index 9936924..faac58b 100644 --- a/src/scripts/chartist-plugin-zoom.js +++ b/src/scripts/chartist-plugin-zoom.js @@ -153,7 +153,7 @@ }; function onMouseUp(event) { - if (event.button === 0) { + if (event.button === 0 && downPosition) { var box = getRect(downPosition, position(event, svg)); zoomIn(box); downPosition = null;