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.
This commit is contained in:
Родитель
c0e5b96336
Коммит
bd90a2f1bf
|
@ -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;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,5 +1,5 @@
|
|||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче