(e: MouseEvent | PointerEvent | TouchEvent, cube: VegaDeckGl.types.Cube)
| 606 | } |
| 607 | |
| 608 | private onCubeHover(e: MouseEvent | PointerEvent | TouchEvent, cube: VegaDeckGl.types.Cube) { |
| 609 | if (this._tooltip) { |
| 610 | this._tooltip.finalize(); |
| 611 | this._tooltip = null; |
| 612 | } |
| 613 | if (!cube) { |
| 614 | return; |
| 615 | } |
| 616 | const currentData = this._dataScope.currentData(); |
| 617 | const index = getDataIndexOfCube(cube, currentData); |
| 618 | if (index >= 0) { |
| 619 | this._tooltip = new Tooltip({ |
| 620 | options: this.options.tooltipOptions, |
| 621 | item: currentData[index], |
| 622 | position: e as MouseEvent, |
| 623 | cssPrefix: this.presenter.style.cssPrefix, |
| 624 | }); |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | private onTextHover(e: MouseEvent | PointerEvent | TouchEvent, t: VegaDeckGl.types.VegaTextLayerDatum) { |
| 629 | //return true if highlight color is different |
no test coverage detected