@mocanvas/editor · function · deprecated
declare function getShapeIndicatorNode<T extends UnknownShape>(util: {
indicator?(shape: T): ReactNode;
}, shape: T, bounds: {
x: number;
y: number;
w: number;
h: number;
} | undefined): ReactNodeThe outline to draw over one shape: whatever its util's indicator()
returns, or a rectangle around the shape's geometry bounds when the util has
no indicator (or returns nothing). Both are expressed in *shape-local*
coordinates; the caller wraps them in the shape's page transform.
Pure and exported so a custom Indicators component can reuse the same rule
instead of guessing at it.
@deprecated The SVG indicator layer only draws utils still on the deprecated
indicator() hook. A util that implements getIndicatorPath is stroked on
the canvas overlay by ShapeIndicatorCompositor instead.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.