MouseInteraction
@graph-viz › Globals › core › MouseInteraction
Hierarchy
- MouseInteraction
Index
Constructors
Properties
- camera
- canvas
- dragging
- intersectedPointIdx
- mouse
- nodesData
- nodesMesh
- panDelta
- panEnd
- panStart
- raycaster
- registerClick
Methods
- findNearestNodeIndex
- getMouseInWorldSpace
- onClick
- onContextMenu
- onDragEnd
- onDragStart
- onMouseDown
- onMouseMove
- onMouseUp
- onMouseWheel
- onNodeDrag
- onNodeHoverIn
- onNodeHoverOut
- onPan
- onSecondaryClick
- onZoom
- updateData
Object literals
Constructors
constructor
+ new MouseInteraction(canvas
: HTMLCanvasElement, camera
: OrthographicCamera, nodesMesh
: Nodes, nodesData
: DisplayNode[]): MouseInteraction
Defined in packages/core/src/MouseInteraction.ts:97
Parameters:
Name | Type |
---|---|
canvas | HTMLCanvasElement |
camera | OrthographicCamera |
nodesMesh | Nodes |
nodesData | DisplayNode[] |
Returns: MouseInteraction
Properties
Private
Readonly
camera
• camera: OrthographicCamera
Defined in packages/core/src/MouseInteraction.ts:92
Private
Readonly
canvas
• canvas: HTMLCanvasElement
Defined in packages/core/src/MouseInteraction.ts:91
Private
dragging
• dragging: boolean
Defined in packages/core/src/MouseInteraction.ts:66
Private
intersectedPointIdx
• intersectedPointIdx: number | null
Defined in packages/core/src/MouseInteraction.ts:65
Private
Readonly
mouse
• mouse: Vector2
Defined in packages/core/src/MouseInteraction.ts:96
Private
nodesData
• nodesData: DisplayNode[]
Defined in packages/core/src/MouseInteraction.ts:64
Private
Readonly
nodesMesh
• nodesMesh: Nodes
Defined in packages/core/src/MouseInteraction.ts:90
Private
Readonly
panDelta
• panDelta: Vector3
Defined in packages/core/src/MouseInteraction.ts:95
Private
Readonly
panEnd
• panEnd: Vector3
Defined in packages/core/src/MouseInteraction.ts:94
Private
Readonly
panStart
• panStart: Vector3
Defined in packages/core/src/MouseInteraction.ts:93
Private
Readonly
raycaster
• raycaster: Raycaster
Defined in packages/core/src/MouseInteraction.ts:97
Private
registerClick
• registerClick: boolean
Defined in packages/core/src/MouseInteraction.ts:67
Methods
Private
findNearestNodeIndex
▸ findNearestNodeIndex(event
: MouseEvent): number | null
Defined in packages/core/src/MouseInteraction.ts:169
Parameters:
Name | Type |
---|---|
event | MouseEvent |
Returns: number | null
Private
getMouseInWorldSpace
▸ getMouseInWorldSpace(z
: number): Vector3‹›
Defined in packages/core/src/MouseInteraction.ts:299
Parameters:
Name | Type |
---|---|
z | number |
Returns: Vector3‹›
onClick
▸ onClick(callback
: ClickEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:141
Parameters:
Name | Type |
---|---|
callback | ClickEventHandler |
Returns: void
Private
onContextMenu
▸ onContextMenu(event
: MouseEvent): void
Defined in packages/core/src/MouseInteraction.ts:305
Parameters:
Name | Type |
---|---|
event | MouseEvent |
Returns: void
onDragEnd
▸ onDragEnd(callback
: DragEndEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:153
Parameters:
Name | Type |
---|---|
callback | DragEndEventHandler |
Returns: void
onDragStart
▸ onDragStart(callback
: DragStartEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:145
Parameters:
Name | Type |
---|---|
callback | DragStartEventHandler |
Returns: void
Private
onMouseDown
▸ onMouseDown(event
: MouseEvent): void
Defined in packages/core/src/MouseInteraction.ts:213
Parameters:
Name | Type |
---|---|
event | MouseEvent |
Returns: void
Private
onMouseMove
▸ onMouseMove(event
: MouseEvent): void
Defined in packages/core/src/MouseInteraction.ts:253
Parameters:
Name | Type |
---|---|
event | MouseEvent |
Returns: void
Private
onMouseUp
▸ onMouseUp(event
: MouseEvent): void
Defined in packages/core/src/MouseInteraction.ts:231
Parameters:
Name | Type |
---|---|
event | MouseEvent |
Returns: void
Private
onMouseWheel
▸ onMouseWheel(event
: WheelEvent): void
Defined in packages/core/src/MouseInteraction.ts:293
Parameters:
Name | Type |
---|---|
event | WheelEvent |
Returns: void
onNodeDrag
▸ onNodeDrag(callback
: NodeDragEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:149
Parameters:
Name | Type |
---|---|
callback | NodeDragEventHandler |
Returns: void
onNodeHoverIn
▸ onNodeHoverIn(callback
: HoverEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:133
Parameters:
Name | Type |
---|---|
callback | HoverEventHandler |
Returns: void
onNodeHoverOut
▸ onNodeHoverOut(callback
: HoverEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:137
Parameters:
Name | Type |
---|---|
callback | HoverEventHandler |
Returns: void
onPan
▸ onPan(callback
: PanEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:157
Parameters:
Name | Type |
---|---|
callback | PanEventHandler |
Returns: void
onSecondaryClick
▸ onSecondaryClick(callback
: SecondaryClickEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:165
Parameters:
Name | Type |
---|---|
callback | SecondaryClickEventHandler |
Returns: void
onZoom
▸ onZoom(callback
: ZoomEventHandler): void
Defined in packages/core/src/MouseInteraction.ts:161
Parameters:
Name | Type |
---|---|
callback | ZoomEventHandler |
Returns: void
updateData
▸ updateData(nodesData
: DisplayNode[]): void
Defined in packages/core/src/MouseInteraction.ts:129
Parameters:
Name | Type |
---|---|
nodesData | DisplayNode[] |
Returns: void
Object literals
Private
registeredEventHandlers
▪ registeredEventHandlers: object
Defined in packages/core/src/MouseInteraction.ts:68
click
• click: noop = noop
Defined in packages/core/src/MouseInteraction.ts:79
dragEnd
• dragEnd: noop = noop
Defined in packages/core/src/MouseInteraction.ts:83
dragStart
• dragStart: noop = noop
Defined in packages/core/src/MouseInteraction.ts:82
nodeDrag
• nodeDrag: noop = noop
Defined in packages/core/src/MouseInteraction.ts:84
nodeHoverIn
• nodeHoverIn: noop = noop
Defined in packages/core/src/MouseInteraction.ts:80
nodeHoverOut
• nodeHoverOut: noop = noop
Defined in packages/core/src/MouseInteraction.ts:81
pan
• pan: noop = noop
Defined in packages/core/src/MouseInteraction.ts:85
secondaryClick
• secondaryClick: noop = noop
Defined in packages/core/src/MouseInteraction.ts:87
zoom
• zoom: noop = noop
Defined in packages/core/src/MouseInteraction.ts:86