d3.mouse

d3.mouse(container)

Returns the x and y coordinates of 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].
返回一个相对container的数组坐标[x, y]

你可能感兴趣的:(d3.mouse)