InputEvent
Defined in: events/InputEvent.ts:9
GoJS-compatible: Wraps a browser event delivered to GraphObject handlers. Exposes diagram/model/document-point accessors that DOM MouseEvents lack.
Constructors
Sección titulada «Constructors»Constructor
Sección titulada «Constructor»new InputEvent(
source):InputEvent
Defined in: events/InputEvent.ts:23
Parameters
Sección titulada «Parameters»MouseEvent | KeyboardEvent
Returns
Sección titulada «Returns»InputEvent
Properties
Sección titulada «Properties»clickCount
Sección titulada «clickCount»clickCount:
number=0
Defined in: events/InputEvent.ts:19
The click count for mouse events.
diagram
Sección titulada «diagram»diagram:
Diagram|null=null
Defined in: events/InputEvent.ts:13
The diagram that received the event (if available).
handled
Sección titulada «handled»handled:
boolean=false
Defined in: events/InputEvent.ts:17
Whether this event has been handled (prevents further propagation).
key:
string=''
Defined in: events/InputEvent.ts:21
The key involved in keyboard events (may be empty for mouse events).
readonlysource:MouseEvent|KeyboardEvent
Defined in: events/InputEvent.ts:11
The original DOM event.
targetObject
Sección titulada «targetObject»targetObject:
GraphObject|null=null
Defined in: events/InputEvent.ts:15
The GraphObject the event targeted (if available).
Accessors
Sección titulada «Accessors»Get Signature
Sección titulada «Get Signature»get alt():
boolean
Defined in: events/InputEvent.ts:59
GoJS-compatible: whether the Alt/Option key was held during the event.
Returns
Sección titulada «Returns»boolean
Get Signature
Sección titulada «Get Signature»get button():
number
Defined in: events/InputEvent.ts:69
GoJS-compatible: the mouse button involved (0=left, 1=middle, 2=right), or -1 for non-mouse events.
Returns
Sección titulada «Returns»number
control
Sección titulada «control»Get Signature
Sección titulada «Get Signature»get control():
boolean
Defined in: events/InputEvent.ts:49
GoJS-compatible: whether the Control key was held during the event.
Returns
Sección titulada «Returns»boolean
Get Signature
Sección titulada «Get Signature»get left():
boolean
Defined in: events/InputEvent.ts:74
GoJS-compatible: whether the left mouse button was involved.
Returns
Sección titulada «Returns»boolean
Get Signature
Sección titulada «Get Signature»get meta():
boolean
Defined in: events/InputEvent.ts:64
GoJS-compatible: whether the Meta/Command key was held during the event.
Returns
Sección titulada «Returns»boolean
Get Signature
Sección titulada «Get Signature»get model():
GraphLinksModel|null
Defined in: events/InputEvent.ts:44
GoJS-compatible: The model of the diagram receiving the event.
Returns
Sección titulada «Returns»GraphLinksModel | null
Get Signature
Sección titulada «Get Signature»get right():
boolean
Defined in: events/InputEvent.ts:79
GoJS-compatible: whether the right mouse button was involved.
Returns
Sección titulada «Returns»boolean
Get Signature
Sección titulada «Get Signature»get shift():
boolean
Defined in: events/InputEvent.ts:54
GoJS-compatible: whether the Shift key was held during the event.
Returns
Sección titulada «Returns»boolean
Methods
Sección titulada «Methods»documentPoint()
Sección titulada «documentPoint()»documentPoint():
object
Defined in: events/InputEvent.ts:28
GoJS-compatible: The point in document coordinates.
Returns
Sección titulada «Returns»object
x:
number
y:
number
viewPoint()
Sección titulada «viewPoint()»viewPoint():
object
Defined in: events/InputEvent.ts:36
GoJS-compatible: The point in viewport (screen) coordinates.
Returns
Sección titulada «Returns»object
x:
number
y:
number