@mocanvas/editor · function

getShapeIndicatorPath

declare function getShapeIndicatorPath<T>(util: IndicatorPathSource<T>, shape: T, bounds: {
    x: number;
    y: number;
    w: number;
    h: number;
} | undefined): TLIndicatorPath | undefined

The paths to stroke for one shape, or undefined for "this layer draws nothing here".

undefined covers three different situations on purpose — the util said nothing, the util is still on the deprecated React hook, or the shape has no geometry — because the caller treats all three the same way: skip it.

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.