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

Function updateMods

stackgl_modules/index.js:29068–29087  ·  view source on GitHub ↗
(ev)

Source from the content-addressed store, hash-verified

29066 var attached = false
29067
29068 function updateMods (ev) {
29069 var changed = false
29070 if ('altKey' in ev) {
29071 changed = changed || ev.altKey !== mods.alt
29072 mods.alt = !!ev.altKey
29073 }
29074 if ('shiftKey' in ev) {
29075 changed = changed || ev.shiftKey !== mods.shift
29076 mods.shift = !!ev.shiftKey
29077 }
29078 if ('ctrlKey' in ev) {
29079 changed = changed || ev.ctrlKey !== mods.control
29080 mods.control = !!ev.ctrlKey
29081 }
29082 if ('metaKey' in ev) {
29083 changed = changed || ev.metaKey !== mods.meta
29084 mods.meta = !!ev.metaKey
29085 }
29086 return changed
29087 }
29088
29089 function handleEvent (nextButtons, ev) {
29090 var nextX = mouse.x(ev)

Callers 2

handleEventFunction · 0.85
handleModsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…