@plotly/d3
Version:
13 lines (11 loc) • 346 B
JavaScript
import "../core/array";
import "event";
import "mouse";
d3.touches = function(container, touches) {
if (arguments.length < 2) touches = d3_eventSource().touches;
return touches ? d3_array(touches).map(function(touch) {
var point = d3_mousePoint(container, touch);
point.identifier = touch.identifier;
return point;
}) : [];
};