HoverBehavior
- Kind
- class
- Source
- src/behaviors/HoverBehavior.js:34
Description
Built-in behavior for hover picking and hover labels.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Hover options including nodeHover, edgeHover, hoverLabel, and connected-edge highlighting. |
Returns
Behavior that tracks the current hovered node and edge.
TypeHoverBehaviorNotes
Hover requires picking to be available on the active renderer. The
behavior coordinates with LabelsBehavior when transient hover labels are
enabled.
Instance Properties
id
Source: src/behaviors/HoverBehavior.js:35
Id exposed by the class.
Filtering And State
Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.
getPublicState()
Source: src/behaviors/HoverBehavior.js:179
Returns the current public state value or state.
Example
const value = helios.getPublicState();
ensureStateStyleDefaults()
Source: src/behaviors/HoverBehavior.js:183
Configures or reads ensure state style defaults.
applyOtherElementsState()
Source: src/behaviors/HoverBehavior.js:203
Updates the other elements state state on the current instance.
Network And Persistence
Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.
attach(context)
Source: src/behaviors/HoverBehavior.js:62
Configures or reads attach.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
context | Value passed to attach. |
serialize()
Source: src/behaviors/HoverBehavior.js:147
Handles serialize for the current graph or visualization state.
restore(snapshot = {}) → {this}
Source: src/behaviors/HoverBehavior.js:166
Updates the restore state on the current instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
snapshot | optional | {} | Value passed to restore. |
Returns
This instance.
TypethishandleNetworkReplaced()
Source: src/behaviors/HoverBehavior.js:257
Configures or reads handle network replaced.
Appearance
Visual rendering settings for nodes, edges, labels, legends, density, shading, and background. AppearanceBehavior, LabelsBehavior, and LegendsBehavior cover the built-in controls.
applyHoverLabelConfig()
Source: src/behaviors/HoverBehavior.js:187
Updates the hover label config state on the current instance.
resolveHoverLabelValue(index, network = this.context?.network ?? null)
Source: src/behaviors/HoverBehavior.js:211
Configures or reads resolve hover label value.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
index | number | Node, edge, or attribute index. | ||
network | HeliosNetwork | optional | this.context?.network ?? null | Network instance to read from or mutate. |
Rendering And Picking
Render requests, picking, framebuffer inspection, and attribute tracking. HoverBehavior and SelectionBehavior use these lower-level hooks.
syncPicking()
Source: src/behaviors/HoverBehavior.js:207
Configures or reads sync picking.
Configuration
General configuration setters and compatibility helpers.
clearNodeHover(options = {}) → {Object|this}
Source: src/behaviors/HoverBehavior.js:215
Read or set the clear node hover setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | {} | Options object for this operation. |
Returns
Current clear node hover value when called without arguments; otherwise this instance for chaining.
TypeObject|thisExample
helios.clearNodeHover({
enabled: true,
});
clearEdgeHover(options = {}) → {Object|this}
Source: src/behaviors/HoverBehavior.js:223
Read or set the clear edge hover setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | {} | Options object for this operation. |
Returns
Current clear edge hover value when called without arguments; otherwise this instance for chaining.
TypeObject|thisExample
helios.clearEdgeHover({
enabled: true,
});
Utilities
Additional public helpers that do not belong to a narrower API area.
detach()
Source: src/behaviors/HoverBehavior.js:89
Manages detach for the current instance.
update(options = {}) → {Object|this}
Source: src/behaviors/HoverBehavior.js:102
Read or set the update setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | {} | Options object for this operation. |
Returns
Current update value when called without arguments; otherwise this instance for chaining.
TypeObject|thisExample
helios.update({
enabled: true,
});
emitChange(reason, detail = {})
Source: src/behaviors/HoverBehavior.js:175
Configures or reads emit change.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
reason | string | Reason for this operation. | ||
detail | optional | {} | Event payload passed to listeners. |
applyHoverConnectedEdges()
Source: src/behaviors/HoverBehavior.js:191
Updates the hover connected edges state on the current instance.
applyHighlightConnectedEdges()
Source: src/behaviors/HoverBehavior.js:195
Updates the highlight connected edges state on the current instance.
applyHoverStylePolicy()
Source: src/behaviors/HoverBehavior.js:199
Updates the hover style policy state on the current instance.
handleNodeHover(event)
Source: src/behaviors/HoverBehavior.js:231
Configures or reads handle node hover.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
event | Value passed to handleNodeHover. |
handleEdgeHover(event)
Source: src/behaviors/HoverBehavior.js:244
Configures or reads handle edge hover.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
event | Value passed to handleEdgeHover. |
handleUiBindingChange(event)
Source: src/behaviors/HoverBehavior.js:277
Configures or reads handle ui binding change.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
event | Value passed to handleUiBindingChange. |
handleHighlightChange()
Source: src/behaviors/HoverBehavior.js:284
Configures or reads handle highlight change.