EntityEditor

Extends: EntityGizmo

Source: EntityEditor.ts:16

Entity properties editor. Combines the EntityGizmo on-map transform mechanism with the "Entity Properties" dialog.


Constructor

new EntityEditor(options): EntityEditor

Instance Methods

selectEntity(entity: Entity)

Inherited from EntityGizmo#selectEntity

Overrides: EntityGizmo#selectEntity

Shows the gizmo on the given entity. Activates the control when it is inactive. Changing the selection cancels any running gesture on the previously selected entity.

Parameters

  • entity (Entity) — Entity to transform.

unselectEntity()

Inherited from EntityGizmo#unselectEntity

Overrides: EntityGizmo#unselectEntity

Hides the gizmo and drops the selection. Cancels a running gesture.

getSelectedEntity(): Entity | null

Inherited from EntityGizmo#getSelectedEntity

Overrides: EntityGizmo#getSelectedEntity

Returns the selected entity or null.

Returns

isTransforming(): boolean

Inherited from EntityGizmo#isTransforming

Overrides: EntityGizmo#isTransforming

Returns true while a drag gesture is running.

Returns

  • boolean

getActiveTransform(): IGizmoTransformEvent | null

Inherited from EntityGizmo#getActiveTransform

Overrides: EntityGizmo#getActiveTransform

Returns the running gesture description or null.

Returns

  • IGizmoTransformEvent | null

cancelTransform(): boolean

Inherited from EntityGizmo#cancelTransform

Overrides: EntityGizmo#cancelTransform

Cancels the current gesture and restores the entity transform when possible.

Returns

  • boolean — Whether a gesture was cancelled.

oninit()

Inherited from Control#oninit

Overrides: EntityGizmo#oninit

Control initialization function have to be overridden.

onadd()

Inherited from Control#onadd

Overrides: EntityGizmo#onadd

Control renderer assigning function have to be overridden.

onremove()

Inherited from Control#onremove

Overrides: EntityGizmo#onremove

Control remove function have to be overridden.

onactivate()

Inherited from Control#onactivate

Overrides: EntityGizmo#onactivate

Control activation function have to be overridden.

ondeactivate()

Inherited from Control#ondeactivate

Overrides: EntityGizmo#ondeactivate

Control deactivation function have to be overriden.

addTo()

Inherited from Control#addTo

Overrides: EntityGizmo#addTo

Assign renderer to the control.

remove()

Inherited from Control#remove

Overrides: EntityGizmo#remove

Removes control.

activate()

Inherited from Control#activate

Overrides: EntityGizmo#activate

Activate control.

deactivate()

Inherited from Control#deactivate

Overrides: EntityGizmo#deactivate

Deactivate control.

isActive()

Inherited from Control#isActive

Overrides: EntityGizmo#isActive

Is control active.

Instance Fields

tools

Inherited from EntityGizmo#tools

Overrides: EntityGizmo#tools

Gizmo tool set: which handles are shown.

editMode

Inherited from EntityGizmo#editMode

Overrides: EntityGizmo#editMode

Rotation mode of the rotation rings. Does nothing with tools: "translate".

autoSelect

Inherited from EntityGizmo#autoSelect

Overrides: EntityGizmo#autoSelect

When false, a left click neither selects a map entity nor drops the current selection.

name

Inherited from Control#name

Overrides: EntityGizmo#name

Returns control name.

Returns

  • string