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

Function patchedEvt

src/components/shapes/draw.js:204–210  ·  view source on GitHub ↗
(evt)

Source from the content-addressed store, hash-verified

202 // The shape path's bbox differs from the plot area, so we
203 // re-target events to the subplot's nsewdrag element.
204 function patchedEvt(evt) {
205 const mainPlot = plotinfo.mainplotinfo || plotinfo;
206 const nsew = mainPlot?.draglayer?.select('.nsewdrag').node();
207 if (!nsew) return null;
208
209 return { clientX: evt.clientX, clientY: evt.clientY, target: nsew };
210 }
211
212 node.addEventListener('mousemove', (evt) => {
213 if (gd._dragging) return;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…