Skip to content

Commit

Permalink
Ensure that touch{move,end} listeners are removed.
Browse files Browse the repository at this point in the history
Previously, if there were globally-active touches remaining, a given
zoom gesture was not ended even if locations0 was empty.  This fixes the
problem by checking to see if locations0 is empty.  If so, the gesture
is ended.
  • Loading branch information
jasondavies committed Aug 31, 2013
1 parent 85e738e commit ce12fae
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
13 changes: 7 additions & 6 deletions d3.js
Expand Up @@ -1412,13 +1412,14 @@ d3 = function() {
for (var i = 0, n = changed.length; i < n; ++i) {
delete locations0[changed[i].identifier];
}
relocate();
} else {
w.on(touchmove, null).on(touchend, null);
t.on(mousedown, mousedowned).on(touchstart, touchstarted);
dragRestore();
zoomended(event_);
for (var identifier in locations0) {
return relocate();
}
}
w.on(touchmove, null).on(touchend, null);
t.on(mousedown, mousedowned).on(touchstart, touchstarted);
dragRestore();
zoomended(event_);
}
}
function mousewheeled() {
Expand Down

0 comments on commit ce12fae

Please sign in to comment.