Skip to content

API reference / edit-controls / EditControlsOptions

Interface: EditControlsOptions ​

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

Properties ​

actions? ​

ts
optional actions?: readonly EditControlAction[];

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

Buttons of your own, shown with the box for the graphics each one's visible accepts. Give each its own corner.

See ​

EditControlAction


corners? ​

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

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

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:96

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:89

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:103

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:82

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:84

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

Released under the MIT License.