InputEvent$Typings extension

on

Properties

alt bool
Gets or sets whether the alt key is being held down. This is true if the key was pressed at the time of the event.
getter/setter pair
bubbles bool
Gets or sets whether the underlying #event is prevented from bubbling up the hierarchy of HTML elements outside of the Diagram and whether any default action is canceled. Setting this is uncommon, but may be needed in some CommandHandler overrides in order to pass along events, such as keystrokes, to parent elements of the Diagram.
getter/setter pair
button num
Gets or sets the numerical value representing the mouse button that caused this event.
getter/setter pair
buttons num
Gets or sets the set of buttons that are currently being held down. If this is a mouseup event, this set of buttons does not include the button that was just released, which will be the value of #button.
getter/setter pair
clickCount num
Gets or sets whether this event represents a click or a double-click. It is zero if not a click; one if a single-click; two if a double-click. This property is valid if this is a mouse event.
getter/setter pair
control bool
Gets or sets whether the control key is being held down. This is true if the key was pressed at the time of the event.
getter/setter pair
delta num
Gets or sets the amount of change associated with a mouse-wheel rotation. It is an abstract number, either positive or negative. This property is valid if this is a mouse-wheel event.
getter/setter pair
diagram Diagram
Gets the source diagram associated with the event.
getter/setter pair
documentPoint Point
Gets or sets the point at which this input event occurred, in document coordinates. The Point is in document coordinates, the same as the GraphObject#position for Parts in the diagram. This should be valid for mouse events. For keyboard events, this is the last available mouse point.
getter/setter pair
down bool
Gets or sets whether the InputEvent represents a mouse-down or a key-down event. The default value is false.
getter/setter pair
event Event?
Gets or sets the platform's user-agent-supplied event for this event. It may be null if no underlying event exists.
getter/setter pair
handled bool
Gets or sets whether an InputEvent that applies to a GraphObject and bubbles up the chain of containing Panels is stopped from continuing up the chain.
getter/setter pair
isMultiTouch bool
This property is true when the InputEvent is caused by a touch event that registered more than one touch.
getter/setter pair
isTouchEvent bool
This read-only property is true when the InputEvent is caused by a touch event.
getter/setter pair
key String
Gets or sets the key pressed or released as this event. This property is valid if this is a keyboard event.
getter/setter pair
left bool
Gets or sets whether the logical left mouse button is being held down. This is true if the button was pressed at the time of the event.
getter/setter pair
meta bool
Gets or sets whether the meta key is being held down. This is true if the key was pressed at the time of the event.
getter/setter pair
middle bool
Gets or sets whether the logical middle mouse button is being held down. This is true if the button was pressed at the time of the event.
getter/setter pair
modifiers num
Gets or sets the modifier keys that were used with the mouse or keyboard event. The number will be a combination of flags representing Control, Shift, Alt or Meta.
getter/setter pair
Gets or sets whether the logical right mouse button is being held down. This is true if the button was pressed at the time of the event.
getter/setter pair
shift bool
Gets or sets whether the shift key is being held down. This is true if the key was pressed at the time of the event.
getter/setter pair
targetDiagram Diagram?
Gets or sets the diagram associated with the canvas that the event is currently targeting.
getter/setter pair
targetObject GraphObject?
Gets or sets the GraphObject that is at the current mouse point, if any.
getter/setter pair
timestamp num
Gets or sets the time at which the event occurred, in milliseconds.
getter/setter pair
up bool
Gets or sets whether the InputEvent represents a mouse-up or a key-up event. The default value is false.
getter/setter pair
viewPoint Point
Gets or sets the point at which this input event occurred. The Point is in view coordinates within the viewport, not in document coordinates. This should be valid for mouse events. For keyboard events, this is the last available mouse point.
getter/setter pair

Methods

copy() InputEvent
Make a copy of this InputEvent. @expose @return {InputEvent}