@mocanvas/editor · interface

TLOverlay

interface TLOverlay

One thing an overlay wants drawn this frame.

An overlay util is not one drawing — a snap-line util paints several lines, a collaborator util one cursor per person. Each of those is an overlay, with an id of its own so the manager can say which one the pointer is over.


Properties · 5

cursor?: string

Cursor to show while the pointer is over it.

geometry?: Geometry2d

Page-space geometry, when this overlay can be pointed at.

id: string

Unique within the util that produced it.

meta?: unknown

Anything the util needs to paint it. Opaque to the manager.

type: string

The util's type, filled in by the manager.

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.