Skip to content

@graphty/graphty-element / managers / DefaultGraphContext

Class: DefaultGraphContext ​

Defined in: graphty-element/src/managers/GraphContext.ts:130

Default implementation of GraphContext This can be used by Graph to provide services to Node/Edge

Implements ​

Constructors ​

Constructor ​

new DefaultGraphContext(styleManager, dataManager, layoutManager, meshCache, scene, statsManager, config, rayUpdateNeeded): DefaultGraphContext

Defined in: graphty-element/src/managers/GraphContext.ts:142

Creates an instance of DefaultGraphContext

Parameters ​

styleManager ​

StyleManager

StyleManager instance for style operations

dataManager ​

DataManager

DataManager instance for node/edge operations

layoutManager ​

LayoutManager

LayoutManager instance for layout operations

meshCache ​

MeshCache

MeshCache instance for mesh creation and caching

scene ​

Scene

Babylon.js Scene instance

statsManager ​

StatsManager

StatsManager instance for performance monitoring

config ​

GraphContextConfig

Graph-level configuration options

rayUpdateNeeded ​

boolean = true

Whether ray updates are needed for edge arrows

Returns ​

DefaultGraphContext

Methods ​

getConfig() ​

getConfig(): GraphContextConfig

Defined in: graphty-element/src/managers/GraphContext.ts:232

Get graph-level configuration options

Returns ​

GraphContextConfig

GraphContextConfig instance

Implementation of ​

GraphContext.getConfig


getDataManager() ​

getDataManager(): DataManager

Defined in: graphty-element/src/managers/GraphContext.ts:165

Get the DataManager for node/edge operations

Returns ​

DataManager

DataManager instance

Implementation of ​

GraphContext.getDataManager


getLayoutManager() ​

getLayoutManager(): LayoutManager

Defined in: graphty-element/src/managers/GraphContext.ts:173

Get the LayoutManager for layout operations

Returns ​

LayoutManager

LayoutManager instance

Implementation of ​

GraphContext.getLayoutManager


getMeshCache() ​

getMeshCache(): MeshCache

Defined in: graphty-element/src/managers/GraphContext.ts:181

Get the MeshCache for mesh creation and caching

Returns ​

MeshCache

MeshCache instance

Implementation of ​

GraphContext.getMeshCache


getScene() ​

getScene(): Scene

Defined in: graphty-element/src/managers/GraphContext.ts:189

Get the Babylon.js Scene

Returns ​

Scene

Scene instance

Implementation of ​

GraphContext.getScene


getStatsManager() ​

getStatsManager(): StatsManager

Defined in: graphty-element/src/managers/GraphContext.ts:197

Get the StatsManager for performance monitoring

Returns ​

StatsManager

StatsManager instance

Implementation of ​

GraphContext.getStatsManager


getStyleManager() ​

getStyleManager(): StyleManager

Defined in: graphty-element/src/managers/GraphContext.ts:157

Get the StyleManager for style operations

Returns ​

StyleManager

StyleManager instance

Implementation of ​

GraphContext.getStyleManager


is2D() ​

is2D(): boolean

Defined in: graphty-element/src/managers/GraphContext.ts:205

Check if the graph is in 2D mode

Returns ​

boolean

True if in 2D mode, false otherwise

Implementation of ​

GraphContext.is2D


isRunning() ​

isRunning(): boolean

Defined in: graphty-element/src/managers/GraphContext.ts:248

Check if the layout is running

Returns ​

boolean

True if layout is running, false otherwise

Implementation of ​

GraphContext.isRunning


needsRayUpdate() ​

needsRayUpdate(): boolean

Defined in: graphty-element/src/managers/GraphContext.ts:216

Check if ray updates are needed for edge arrows

Returns ​

boolean

True if ray updates are needed, false otherwise

Implementation of ​

GraphContext.needsRayUpdate


setRayUpdateNeeded() ​

setRayUpdateNeeded(needed): void

Defined in: graphty-element/src/managers/GraphContext.ts:224

Set whether ray updates are needed for edge arrows

Parameters ​

needed ​

boolean

Whether ray updates are needed

Returns ​

void


setRunning() ​

setRunning(running): void

Defined in: graphty-element/src/managers/GraphContext.ts:256

Set the running state

Parameters ​

running ​

boolean

Whether layout should be running

Returns ​

void

Implementation of ​

GraphContext.setRunning


updateConfig() ​

updateConfig(config): void

Defined in: graphty-element/src/managers/GraphContext.ts:240

Update configuration

Parameters ​

config ​

Partial<GraphContextConfig>

Partial configuration to merge with existing config

Returns ​

void