MCPcopy
hub / github.com/chartjs/Chart.js / fromNativeEvent

Function fromNativeEvent

src/platform/platform.dom.js:109–119  ·  view source on GitHub ↗
(event, chart)

Source from the content-addressed store, hash-verified

107}
108
109function fromNativeEvent(event, chart) {
110 const type = EVENT_TYPES[event.type] || event.type;
111 const {x, y} = getRelativePosition(event, chart);
112 return {
113 type,
114 chart,
115 native: event,
116 x: x !== undefined ? x : null,
117 y: y !== undefined ? y : null,
118 };
119}
120
121function nodeListContains(nodeList, canvas) {
122 for (const node of nodeList) {

Callers 1

createProxyAndListenFunction · 0.85

Calls 1

getRelativePositionFunction · 0.85

Tested by

no test coverage detected