Skip to content

Commit

Permalink
Fix mouseup to be handled only if mouse was down in the chart area.
Browse files Browse the repository at this point in the history
  • Loading branch information
hansmaad committed Jun 8, 2016
1 parent ba7431a commit 05aaba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/chartist-plugin-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05aaba7

Please sign in to comment.