Skip to content

NetworkHit

Defined in: network/network.ts:61

What a network Network.pick resolved — carried as the datum of the HoverHit passed to on("hover" | "click") handlers. The hit’s id is the tree node id: for a leaf that’s the original node index; an aggregate id is ≥ leafCount.

aggregate: boolean

Defined in: network/network.ts:63

True if the target is an aggregate glyph (a collapsed module/subtree), false for a single node.


count: number

Defined in: network/network.ts:65

Leaf nodes the target covers — 1 for a leaf, the subtree size for an aggregate.


readonly optional level?: "state" | "physical"

Defined in: network/network.ts:89

State-network mode (Network.stateNetwork, #494): which graph the target belongs to — "state" for a state node (or, under the state view’s LOD, an aggregate of state nodes), "physical" for a physical node: a node of the physical view, or a both-view container. So an app can name a hit from its own state and physical names without mapping ids itself. Absent outside state-network mode.


readonly optional open?: boolean

Defined in: network/network.ts:82

true when the pointer picked an open module by its boundary ring (#476, lod({ moduleBoundary })): the module the cut has expanded into its members, hit on the ring drawn around them. Otherwise absent — the hit is a drawn glyph (a leaf or a collapsed module), or an entry of selection(). Everything else about the hit is what the same module collapsed would give: id is its tree id, aggregate, count, path and members() are its own, and it hovers, clicks and selects as that module.


readonly optional path?: readonly number[]

Defined in: network/network.ts:74

With a module hierarchy (data(graph, { modules }), or lod({ modules })): the target’s Infomap path — the module’s path for a module aggregate (e.g. [1, 2]), the node’s own full path for a leaf, with LOD on or off (#326). Absent without a hierarchy, and for an aggregate of structural coarsening. Lets labelOf / click handlers name a module. Computed when read, O(tree depth). With LOD off the labelOf / importanceOf info carries no path (it is one shared object, so the per-frame label pass allocates nothing); read the node’s path from your records by id there.


readonly optional physical?: number

Defined in: network/network.ts:96

With level: "physical": the physical node’s id. In the physical view it is the hit’s id; a both-view container’s id is past the state ids (stateCount + physical), since it selects, hovers and drags as an aggregate of its state nodes (its members()). Label info leaves it out: a label’s id is already the id of its level.