Skip to content

@graphty/graphty-element / managers / GraphContext

Interface: GraphContext

Defined in: src/managers/GraphContext.ts:18

GraphContext provides controlled access to graph services This interface allows Node and Edge classes to access required services without direct dependency on the Graph class, eliminating circular dependencies

Methods

getConfig()

getConfig(): GraphContextConfig

Defined in: src/managers/GraphContext.ts:62

Get graph-level configuration options

Returns

GraphContextConfig


getDataManager()

getDataManager(): DataManager

Defined in: src/managers/GraphContext.ts:27

Get the DataManager for node/edge operations

Returns

DataManager


getEventManager()?

optional getEventManager(): EventManager | undefined

Defined in: src/managers/GraphContext.ts:97

Get EventManager for emitting events Optional method for event emission

Returns

EventManager | undefined

Since

1.5.0


getLayoutManager()

getLayoutManager(): LayoutManager

Defined in: src/managers/GraphContext.ts:32

Get the LayoutManager for layout operations

Returns

LayoutManager


getMeshCache()

getMeshCache(): MeshCache

Defined in: src/managers/GraphContext.ts:37

Get the MeshCache for mesh creation and caching

Returns

MeshCache


getScene()

getScene(): Scene

Defined in: src/managers/GraphContext.ts:42

Get the Babylon.js Scene

Returns

Scene


getSelectionManager()?

optional getSelectionManager(): SelectionManager | undefined

Defined in: src/managers/GraphContext.ts:90

Get SelectionManager for node selection operations Optional method for selection functionality

Returns

SelectionManager | undefined


getStatsManager()

getStatsManager(): StatsManager

Defined in: src/managers/GraphContext.ts:47

Get the StatsManager for performance monitoring

Returns

StatsManager


getStyleManager()

getStyleManager(): StyleManager

Defined in: src/managers/GraphContext.ts:22

Get the StyleManager for style operations

Returns

StyleManager


getXRConfig()?

optional getXRConfig(): XRConfig | undefined

Defined in: src/managers/GraphContext.ts:78

Get XR configuration Optional method for XR-specific functionality

Returns

XRConfig | undefined


getXRSessionManager()?

optional getXRSessionManager(): XRSessionManager | undefined

Defined in: src/managers/GraphContext.ts:84

Get XR session manager Optional method for XR-specific functionality

Returns

XRSessionManager | undefined


is2D()

is2D(): boolean

Defined in: src/managers/GraphContext.ts:52

Check if the graph is in 2D mode

Returns

boolean


isRunning()

isRunning(): boolean

Defined in: src/managers/GraphContext.ts:67

Check if the layout is running

Returns

boolean


needsRayUpdate()

needsRayUpdate(): boolean

Defined in: src/managers/GraphContext.ts:57

Check if ray updates are needed (for edge arrows)

Returns

boolean


setRunning()

setRunning(running): void

Defined in: src/managers/GraphContext.ts:72

Set the running state

Parameters

running

boolean

Returns

void