pointSurfaceTooltip
Shows the tooltip for what a surface found under the pointer, or takes it down with null.
@internote/canvas-sdk/reactOn this page
import { pointSurfaceTooltip } from '@internote/canvas-sdk/react';For a surface that does its own hit-testing — nearest within a slop, an edge found by its distance to a curve — rather than leaving it to the elements, so there is no one element to spread surfaceTooltip onto. Call it from the surface's pointer move with whatever is under the pointer now; moving within the same thing only moves the card.
#Signature
(where: Addressed, over: SurfacePointing | null): void#Parameters
whereWhich environment the surface is.
overWhat is under the pointer, or
null for nothing.#Example
pointSurfaceTooltip(ctx, vertex === null ? null : { key: `v${vertex}`, within: svg, x: e.clientX, y: e.clientY, tip: () => vertexTip(vertex) });Declared in packages/canvas-sdk/src/react/surface-tooltip.tsx:167.