Options
All
  • Public
  • Public/Protected
  • All
Menu

Provide a chance for plugins to handle entity related events. See enum EntityOperation for more details about each operation

Hierarchy

Index

Properties

entity

entity: Entity

The entity that editor is operating on

Optional eventDataCache

eventDataCache: {}

An optional event cache. This will be consumed by event cache API to store some expensive calculation result. So that for the same event across plugins, the result doesn't need to be calculated again

Type declaration

  • [key: string]: any

eventType

eventType: "entityOperation"

Type of this event

operation

operation: EntityOperation

Operation to this entity

Optional rawEvent

rawEvent: Event

Optional raw event. Need to do null check before use its value

Optional shouldPersist

shouldPersist: boolean

For EntityOperation.NewEntity, plugin can set this property to true then the entity will be persisted. A persisted entity won't be touched during undo/redo, unless it does not exist after undo/redo. For other operation types, this value will be ignored.

Optional state

state: string

For EntityOperation.UpdateEntityState, we use this object to pass the new entity state to plugin. For other operation types, it is not used.

Generated using TypeDoc