ElementOverlayProps
Props for the ElementOverlay component.
Properties​
cell?​
readonly optional cell?: ID | Cell<Attributes<Selectors>, ModelSetOptions> | null;
Element the overlay attaches to — a dia.Cell instance or a cell id.
Required when used outside renderElement; pass null to unmount the
overlay. Inside renderElement, omit this prop: the element is taken from
context. Passing cell there is ambiguous, so the overlay renders nothing
and logs a warning.
children​
readonly children: ReactNode;
Overlay content rendered over the element.
className?​
readonly optional className?: string;
CSS class name applied to the overlay container.
dx?​
readonly optional dx?: number;
Horizontal pixel offset from the computed position.
Default​
0
dy?​
readonly optional dy?: number;
Vertical pixel offset from the computed position.
Default​
0
origin?​
readonly optional origin?: OverlayPosition;
Which point of the overlay aligns to the attachment point.
Default​
'top-left'
position?​
readonly optional position?: OverlayPosition;
Where on the element's bbox the overlay attaches.
Default​
'top-left'
rotateWithElement?​
readonly optional rotateWithElement?: boolean;
When true, the overlay rotates together with the element. When false, the overlay stays upright and positions against the axis-aligned rotated bounding box.
Default​
false
scaleWithPaper?​
readonly optional scaleWithPaper?: boolean;
When true, the overlay scales together with the paper (zoom).
Default​
false
style?​
readonly optional style?: CSSProperties;
Inline styles applied to the overlay container.