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

Function _mouseEvent

test/jasmine/tests/sunburst_test.js:23–35  ·  view source on GitHub ↗
(type, gd, v)

Source from the content-addressed store, hash-verified

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