MCPcopy Create free account
hub / github.com/plotly/plotly.js / handleEvent

Function handleEvent

stackgl_modules/index.js:29089–29104  ·  view source on GitHub ↗
(nextButtons, ev)

Source from the content-addressed store, hash-verified

29087 }
29088
29089 function handleEvent (nextButtons, ev) {
29090 var nextX = mouse.x(ev)
29091 var nextY = mouse.y(ev)
29092 if ('buttons' in ev) {
29093 nextButtons = ev.buttons | 0
29094 }
29095 if (nextButtons !== buttonState ||
29096 nextX !== x ||
29097 nextY !== y ||
29098 updateMods(ev)) {
29099 buttonState = nextButtons | 0
29100 x = nextX || 0
29101 y = nextY || 0
29102 callback && callback(buttonState, x, y, mods)
29103 }
29104 }
29105
29106 function clearState (ev) {
29107 handleEvent(0, ev)

Callers 4

clearStateFunction · 0.85
handleMouseMoveFunction · 0.85
handleMouseDownFunction · 0.85
handleMouseUpFunction · 0.85

Calls 2

updateModsFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…