d3.touch()

d3.touch(container[, touches], identifier)

Returns the x and y coordinates of the touch with the specified identifier associated with the current event relative to the specified container. The container may be an HTML or SVG container element, such as a G element or an SVG element. The coordinates are returned as a two-element array of numbers [x, y]. If there is no touch with the specified identifier in touches, returns null; this can be useful for ignoring touchmove events where the only some touches have moved. If touches is not specified, it defaults to the current event’s changedTouches property.

doc_D3_Js
2016-11-24 10:27:32
Comments
Leave a Comment

Please login to continue.