GeezerVison is showing maxgraph.github.io — EventObject | @maxgraph/core
EventObject is a wrapper for all properties of a single event.
Additionally, it also offers functions to consume the event and check if it was consumed as follows:
evt.consume();
INV: evt.isConsumed() == true
Constructors
constructor
-
new EventObject(name?: string, ...args: any[]): EventObject
Constructs a new event object with the specified name. An optional
sequence of key, value pairs can be appended to define properties.
Example:
new EventObject("eventName", key1, val1, .., keyN, valN)
Parameters
- name: string = ''
- ...args: any[]
Returns EventObject
Properties
consumed
consumed: boolean = false
Holds the consumed state. Default is false.
properties
properties: EventProperties
Holds the properties as an associative array.
Methods
getProperties
-
getProperties(): EventProperties
getProperty
-
getProperty(key: string): any
Returns the property for the given key.
Returns any
isConsumed
-
Returns true if the event has been consumed.
Returns boolean
On This Page
Constructors
Properties
Methods