Skip to content

Commit 61e4693

Browse files
committed
Workaround for Chrome touchmove issue 412723.
Fixes d3#2013.
1 parent a10b226 commit 61e4693

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

d3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,10 +1377,11 @@
13771377
}
13781378
}
13791379
function touchstarted() {
1380-
var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that).on(mousedown, null).on(touchstart, started), dragRestore = d3_event_dragSuppress();
1380+
var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], dragRestore = d3_event_dragSuppress();
13811381
d3_selection_interrupt.call(that);
13821382
started();
13831383
zoomstarted(dispatch);
1384+
var subject = d3.select(that).on(mousedown, null).on(touchstart, started);
13841385
function relocate() {
13851386
var touches = d3.touches(that);
13861387
scale0 = view.k;

0 commit comments

Comments
 (0)