MCPcopy Index your code
hub / github.com/plotly/plotly.js / _mouseEvent

Function _mouseEvent

test/jasmine/tests/treemap_test.js:24–36  ·  view source on GitHub ↗
(type, gd, v)

Source from the content-addressed store, hash-verified

22var SLICES_TEXT_SELECTOR = '.treemaplayer text.slicetext';
23
24function _mouseEvent(type, gd, v) {
25 return function () {
26 if (Array.isArray(v)) {
27 // px-based position
28 mouseEvent(type, v[0], v[1]);
29 } else {
30 // position from slice number
31 var gd3 = d3Select(gd);
32 var el = gd3.select('.slice:nth-child(' + v + ')').node();
33 mouseEvent(type, 0, 0, { element: el });
34 }
35 };
36}
37
38function hover(gd, v) {
39 return _mouseEvent('mouseover', gd, v);

Callers 3

hoverFunction · 0.70
unhoverFunction · 0.70
clickFunction · 0.70

Calls 1

mouseEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…