@mocanvas/editor · interface
interface TLIndicatorHost extends OverlayHostWhat the compositor needs from the editor. Structural rather than the
concrete Editor so the interesting half — which shapes, which weight,
which colour — can be tested without a store, an engine or a canvas.
Methods · 10
getCamera(): {getCurrentToolId(): stringgetHintingShapeIds(): readonly string[]getHoveredShape(): UnknownShape | undefinedgetInstanceState(): {getSelectedShapes(): UnknownShape[]getShape(id: string): UnknownShape | undefinedgetShapeGeometryBounds(shape: UnknownShape): {getShapePageTransform(shape: UnknownShape): TLIndicatorTransformgetShapeUtil(shape: UnknownShape): IndicatorShapeUtilProperties · 2
getShapeSketchPath?(shape: UnknownShape): number[] | nullThe outline the hand-drawn style really strokes, or null for a shape drawn
along its geometry. Optional, so a host that has no renderer behind it — a
test double, most of them — simply falls back to the util's own outline.
theme: TLThemeHostThe live theme; the selection colour comes from it, never from this module.
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.