Permalink
Browse files

Use changedTouches instead of touches.

This is because the "touchend" event removes the touch from
event.touches on iOS, but it can still be accessed via
event.changedTouches.
  • Loading branch information...
1 parent c0e5b96 commit bd90a2f1bf1f0764b261ba92c468ffb11750d905 @jasondavies jasondavies committed Oct 25, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 d3.js
  2. +1 −1 d3.min.js
  3. +1 −1 src/svg/touches.js
View
2 d3.js
@@ -3530,7 +3530,7 @@ function d3_svg_mousePoint(container, e) {
return [point.x, point.y];
};
d3.svg.touches = function(container) {
- var touches = d3.event.touches;
+ var touches = d3.event.changedTouches;
return touches ? d3_array(touches).map(function(touch) {
var point = d3_svg_mousePoint(container, touch);
point.identifier = touch.identifier;
Oops, something went wrong.

0 comments on commit bd90a2f

Please sign in to comment.