UNPKG

@plotly/d3

Version:

A JavaScript visualization library for HTML and SVG.

13 lines (11 loc) 346 B
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; }) : []; };