Skip to content

API reference / edit-controls / EditControlsOptions

Interface: EditControlsOptions ​

Defined in: tacticalgraphics/ui/editControls.ts:51

Properties ​

corners? ​

ts
optional corners?: Partial<Record<GestureKind, EditControlCorner>>;

Defined in: tacticalgraphics/ui/editControls.ts:65

Which corner of the box each button hangs from. Default move top-left, rotate top-right, resize bottom-right.


gestures? ​

ts
optional gestures?: readonly GestureKind[];

Defined in: tacticalgraphics/ui/editControls.ts:70

Which buttons to offer at all. Default all three. A button is still hidden for a symbol that refuses its gesture; this only takes buttons away.


icons? ​

ts
optional icons?: Partial<Record<GestureKind, string | Element>>;

Defined in: tacticalgraphics/ui/editControls.ts:63

A button's picture, in place of the built-in one: SVG or HTML markup as a string, or an element (an icon font's <i>, an <img>), which is moved into the button.


injectStyles? ​

ts
optional injectStyles?: boolean;

Defined in: tacticalgraphics/ui/editControls.ts:75

Whether to add the default stylesheet to the container's document (or shadow root). Default true. Pass false to style the classes yourself.


isActive? ​

ts
optional isActive?: () => boolean;

Defined in: tacticalgraphics/ui/editControls.ts:56

Whether the controls should show right now. Default: while the engine is in edit mode. Asked on every animation frame, so keep it cheap.

Returns ​

boolean


labels? ​

ts
optional labels?: Partial<Record<GestureKind, string>>;

Defined in: tacticalgraphics/ui/editControls.ts:58

Button labels, used for the tooltip and for screen readers. Default Move, Rotate and Resize.

Released under the MIT License.