PointerInputEvent
Defines custom event types used throughout the ngDiagram library for handling user input.
The main type, PointerInputEvent
, extends the native PointerEvent
with additional flags
that indicate whether specific diagram interactions (such as selection, zooming, linking, rotation)
have already been handled. These flags are used by input event directives and handlers
to coordinate and prevent duplicate processing of the same pointer event.
This type is used as the event parameter in input event handlers and services across the public API and internal logic.
Example usage:
onPointerDown(event: PointerInputEvent) { if (!event.linkingHandled) { // handle linking logic event.linkingHandled = true; }}
Extends
Section titled “Extends”PointerEvent
Properties
Section titled “Properties”altitudeAngle
Section titled “altitudeAngle”
readonly
altitudeAngle:number
Inherited from
Section titled “Inherited from”PointerEvent.altitudeAngle
altKey
Section titled “altKey”
readonly
altKey:boolean
Inherited from
Section titled “Inherited from”PointerEvent.altKey
azimuthAngle
Section titled “azimuthAngle”
readonly
azimuthAngle:number
Inherited from
Section titled “Inherited from”PointerEvent.azimuthAngle
bubbles
Section titled “bubbles”
readonly
bubbles:boolean
Returns true or false depending on how event was initialized. True if event goes through its target’s ancestors in reverse tree order, and false otherwise.
Inherited from
Section titled “Inherited from”PointerEvent.bubbles
button
Section titled “button”
readonly
button:number
Inherited from
Section titled “Inherited from”PointerEvent.button
buttons
Section titled “buttons”
readonly
buttons:number
Inherited from
Section titled “Inherited from”PointerEvent.buttons
cancelable
Section titled “cancelable”
readonly
cancelable:boolean
Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
Inherited from
Section titled “Inherited from”PointerEvent.cancelable
cancelBubble
Section titled “cancelBubble”cancelBubble:
boolean
Inherited from
Section titled “Inherited from”PointerEvent.cancelBubble
clientX
Section titled “clientX”
readonly
clientX:number
Inherited from
Section titled “Inherited from”PointerEvent.clientX
clientY
Section titled “clientY”
readonly
clientY:number
Inherited from
Section titled “Inherited from”PointerEvent.clientY
composed
Section titled “composed”
readonly
composed:boolean
Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
Inherited from
Section titled “Inherited from”PointerEvent.composed
ctrlKey
Section titled “ctrlKey”
readonly
ctrlKey:boolean
Inherited from
Section titled “Inherited from”PointerEvent.ctrlKey
currentTarget
Section titled “currentTarget”
readonly
currentTarget:null
|EventTarget
Returns the object whose event listener’s callback is currently being invoked.
Inherited from
Section titled “Inherited from”PointerInputEvent
.currentTarget
defaultPrevented
Section titled “defaultPrevented”
readonly
defaultPrevented:boolean
Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
Inherited from
Section titled “Inherited from”PointerEvent.defaultPrevented
detail
Section titled “detail”
readonly
detail:number
Inherited from
Section titled “Inherited from”PointerEvent.detail
eventPhase
Section titled “eventPhase”
readonly
eventPhase:number
Returns the event’s phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
Inherited from
Section titled “Inherited from”PointerEvent.eventPhase
height
Section titled “height”
readonly
height:number
Inherited from
Section titled “Inherited from”PointerEvent.height
isPrimary
Section titled “isPrimary”
readonly
isPrimary:boolean
Inherited from
Section titled “Inherited from”PointerEvent.isPrimary
isTrusted
Section titled “isTrusted”
readonly
isTrusted:boolean
Returns true if event was dispatched by the user agent, and false otherwise.
Inherited from
Section titled “Inherited from”PointerEvent.isTrusted
layerX
Section titled “layerX”
readonly
layerX:number
Inherited from
Section titled “Inherited from”PointerEvent.layerX
layerY
Section titled “layerY”
readonly
layerY:number
Inherited from
Section titled “Inherited from”PointerEvent.layerY
metaKey
Section titled “metaKey”
readonly
metaKey:boolean
Inherited from
Section titled “Inherited from”PointerEvent.metaKey
movementX
Section titled “movementX”
readonly
movementX:number
Inherited from
Section titled “Inherited from”PointerEvent.movementX
movementY
Section titled “movementY”
readonly
movementY:number
Inherited from
Section titled “Inherited from”PointerEvent.movementY
offsetX
Section titled “offsetX”
readonly
offsetX:number
Inherited from
Section titled “Inherited from”PointerEvent.offsetX
offsetY
Section titled “offsetY”
readonly
offsetY:number
Inherited from
Section titled “Inherited from”PointerEvent.offsetY
readonly
pageX:number
Inherited from
Section titled “Inherited from”PointerEvent.pageX
readonly
pageY:number
Inherited from
Section titled “Inherited from”PointerEvent.pageY
pointerId
Section titled “pointerId”
readonly
pointerId:number
Inherited from
Section titled “Inherited from”PointerEvent.pointerId
pointerType
Section titled “pointerType”
readonly
pointerType:string
Inherited from
Section titled “Inherited from”PointerEvent.pointerType
pressure
Section titled “pressure”
readonly
pressure:number
Inherited from
Section titled “Inherited from”PointerEvent.pressure
relatedTarget
Section titled “relatedTarget”
readonly
relatedTarget:null
|EventTarget
Inherited from
Section titled “Inherited from”PointerEvent.relatedTarget
returnValue
Section titled “returnValue”returnValue:
boolean
Inherited from
Section titled “Inherited from”PointerEvent.returnValue
screenX
Section titled “screenX”
readonly
screenX:number
Inherited from
Section titled “Inherited from”PointerEvent.screenX
screenY
Section titled “screenY”
readonly
screenY:number
Inherited from
Section titled “Inherited from”PointerEvent.screenY
shiftKey
Section titled “shiftKey”
readonly
shiftKey:boolean
Inherited from
Section titled “Inherited from”PointerEvent.shiftKey
srcElement
Section titled “srcElement”
readonly
srcElement:null
|EventTarget
Inherited from
Section titled “Inherited from”tangentialPressure
Section titled “tangentialPressure”
readonly
tangentialPressure:number
Inherited from
Section titled “Inherited from”PointerEvent.tangentialPressure
target
Section titled “target”
readonly
target:null
|EventTarget
Returns the object to which event is dispatched (its target).
Inherited from
Section titled “Inherited from”
readonly
tiltX:number
Inherited from
Section titled “Inherited from”PointerEvent.tiltX
readonly
tiltY:number
Inherited from
Section titled “Inherited from”PointerEvent.tiltY
timeStamp
Section titled “timeStamp”
readonly
timeStamp:number
Returns the event’s timestamp as the number of milliseconds measured relative to the time origin.
Inherited from
Section titled “Inherited from”PointerEvent.timeStamp
readonly
twist:number
Inherited from
Section titled “Inherited from”PointerEvent.twist
readonly
type:string
Returns the type of event, e.g. “click”, “hashchange”, or “submit”.
Inherited from
Section titled “Inherited from”PointerEvent.type
readonly
view:null
|Window
Inherited from
Section titled “Inherited from”PointerEvent.view
readonly
which:number
Inherited from
Section titled “Inherited from”PointerEvent.which
readonly
width:number
Inherited from
Section titled “Inherited from”PointerEvent.width
readonly
x:number
Inherited from
Section titled “Inherited from”PointerEvent.x
readonly
y:number
Inherited from
Section titled “Inherited from”PointerEvent.y
Methods
Section titled “Methods”composedPath()
Section titled “composedPath()”composedPath():
EventTarget
[]
Returns the invocation target objects of event’s path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root’s mode is “closed” that are not reachable from event’s currentTarget.
Returns
Section titled “Returns”EventTarget
[]
Inherited from
Section titled “Inherited from”PointerEvent.composedPath
getCoalescedEvents()
Section titled “getCoalescedEvents()”getCoalescedEvents():
PointerEvent
[]
Available only in secure contexts.
Returns
Section titled “Returns”PointerEvent
[]
Inherited from
Section titled “Inherited from”PointerEvent.getCoalescedEvents
getModifierState()
Section titled “getModifierState()”getModifierState(
keyArg
):boolean
Parameters
Section titled “Parameters”keyArg
Section titled “keyArg”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”PointerEvent.getModifierState
getPredictedEvents()
Section titled “getPredictedEvents()”getPredictedEvents():
PointerEvent
[]
Returns
Section titled “Returns”PointerEvent
[]
Inherited from
Section titled “Inherited from”PointerEvent.getPredictedEvents
initEvent()
Section titled “initEvent()”initEvent(
type
,bubbles?
,cancelable?
):void
Parameters
Section titled “Parameters”string
bubbles?
Section titled “bubbles?”boolean
cancelable?
Section titled “cancelable?”boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.initEvent
initMouseEvent()
Section titled “initMouseEvent()”initMouseEvent(
typeArg
,canBubbleArg
,cancelableArg
,viewArg
,detailArg
,screenXArg
,screenYArg
,clientXArg
,clientYArg
,ctrlKeyArg
,altKeyArg
,shiftKeyArg
,metaKeyArg
,buttonArg
,relatedTargetArg
):void
Parameters
Section titled “Parameters”typeArg
Section titled “typeArg”string
canBubbleArg
Section titled “canBubbleArg”boolean
cancelableArg
Section titled “cancelableArg”boolean
viewArg
Section titled “viewArg”Window
detailArg
Section titled “detailArg”number
screenXArg
Section titled “screenXArg”number
screenYArg
Section titled “screenYArg”number
clientXArg
Section titled “clientXArg”number
clientYArg
Section titled “clientYArg”number
ctrlKeyArg
Section titled “ctrlKeyArg”boolean
altKeyArg
Section titled “altKeyArg”boolean
shiftKeyArg
Section titled “shiftKeyArg”boolean
metaKeyArg
Section titled “metaKeyArg”boolean
buttonArg
Section titled “buttonArg”number
relatedTargetArg
Section titled “relatedTargetArg”null
| EventTarget
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.initMouseEvent
initUIEvent()
Section titled “initUIEvent()”initUIEvent(
typeArg
,bubblesArg?
,cancelableArg?
,viewArg?
,detailArg?
):void
Parameters
Section titled “Parameters”typeArg
Section titled “typeArg”string
bubblesArg?
Section titled “bubblesArg?”boolean
cancelableArg?
Section titled “cancelableArg?”boolean
viewArg?
Section titled “viewArg?”null
| Window
detailArg?
Section titled “detailArg?”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.initUIEvent
preventDefault()
Section titled “preventDefault()”preventDefault():
void
If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.preventDefault
stopImmediatePropagation()
Section titled “stopImmediatePropagation()”stopImmediatePropagation():
void
Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.stopImmediatePropagation
stopPropagation()
Section titled “stopPropagation()”stopPropagation():
void
When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PointerEvent.stopPropagation