MCPcopy Index your code
hub / github.com/microsoft/SandDance / onCubeHover

Method onCubeHover

packages/sanddance/src/viewer.ts:608–626  ·  view source on GitHub ↗
(e: MouseEvent | PointerEvent | TouchEvent, cube: VegaDeckGl.types.Cube)

Source from the content-addressed store, hash-verified

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

Callers 1

newCubeLayerFunction · 0.45

Calls 3

getDataIndexOfCubeFunction · 0.90
finalizeMethod · 0.45
currentDataMethod · 0.45

Tested by

no test coverage detected