MCPcopy Create free account
hub / github.com/leeoniya/uPlot / onMouse

Function onMouse

src/uPlot.js:689–697  ·  view source on GitHub ↗
(ev, targ, fn, onlyTarg = true)

Source from the content-addressed store, hash-verified

687 const mouseListeners = new Map();
688
689 function onMouse(ev, targ, fn, onlyTarg = true) {
690 const targListeners = mouseListeners.get(targ) || {};
691 const listener = cursor.bind[ev](self, targ, fn, onlyTarg);
692
693 if (listener) {
694 on(ev, targ, targListeners[ev] = listener);
695 mouseListeners.set(targ, targListeners);
696 }
697 }
698
699 function offMouse(ev, targ, fn) {
700 const targListeners = mouseListeners.get(targ) || {};

Callers 3

initLegendRowFunction · 0.85
uPlotFunction · 0.85
mouseDownFunction · 0.85

Calls 1

onFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…