Skip to main content

Function: ElementDecoration()

ElementDecoration(props): ReactPortal

Defined in: diagram/elementLayer.tsx:448

Component to display a decoration over a canvas element.

All entity decorations are rendered as children of a DOM element with reactodia-element-decorators CSS class which immediately follows target canvas element itself in the DOM.

Parent DOM elements for the decoration has translation, width and height set to the same values as the target element to be able to layout decorations via CSS.

Parameters

ParameterTypeDescription

props

{ children: ReactNode; target: Element; }

props.children

ReactNode

Decoration to render over an element.

props.target

Element

Target canvas element to decorate.

Returns

ReactPortal