* @param {ChartEvent} e - The event * @param {import('../types/index.js').ActiveElement[]} lastActive - Previously active elements * @param {boolean} inChartArea - Is the event inside chartArea * @param {boolean} useFinalPosition - Should the evaluation be done with current or final (after
(e, lastActive, inChartArea, useFinalPosition)
| 1372 | * @pravate |
| 1373 | */ |
| 1374 | _getActiveElements(e, lastActive, inChartArea, useFinalPosition) { |
| 1375 | if (e.type === 'mouseout') { |
| 1376 | return []; |
| 1377 | } |
| 1378 | |
| 1379 | if (!inChartArea) { |
| 1380 | // Outside chartArea, the elements set by code stay (eg. by a legend onHover), and the pointer's end. |
| 1381 | return this._activeSetByCode ? lastActive : []; |
| 1382 | } |
| 1383 | |
| 1384 | const hoverOptions = this.options.hover; |
| 1385 | return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition); |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | // @ts-ignore |
no test coverage detected