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

Function determineLastEvent

src/core/core.controller.js:93–101  ·  view source on GitHub ↗

* @param {ChartEvent} e * @param {ChartEvent|null} lastEvent * @param {boolean} inChartArea * @param {boolean} isClick * @returns {ChartEvent|null}

(e, lastEvent, inChartArea, isClick)

Source from the content-addressed store, hash-verified

91 * @returns {ChartEvent|null}
92 */
93function determineLastEvent(e, lastEvent, inChartArea, isClick) {
94 if (!inChartArea || e.type === 'mouseout') {
95 return null;
96 }
97 if (isClick) {
98 return lastEvent;
99 }
100 return e;
101}
102
103class Chart {
104

Callers 1

_handleEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected