Skip to content

@graphty/graphty-element / session / SelectionTarget

Type Alias: SelectionTarget ​

SelectionTarget = ElementIdTarget | NeighborhoodTarget | { scope?: ScopeInput; where: Query; } | { mode?: SelectionTextMode; scope?: ScopeInput; text: string; } | { ids: readonly NodeId[]; } | { scope: ScopeInput; } | { top: ResultRef & object; } | { above: ResultRef & object; } | { range: ResultRef & object; } | { edgesBetween: true; } | { invert: true; } | { note: NoteId; target?: number; }

Defined in: graphty-element/src/session/selection/targets.ts:111

What a selection is being asked to cover.

Several of these read a finished run rather than recomputing anything: "the top twenty by betweenness" is a ranking the run already produced, and rebuilding it here would produce a second ranking that could disagree with the one on screen.

Union Members ​

ElementIdTarget


NeighborhoodTarget


Type Literal ​

{ scope?: ScopeInput; where: Query; }

Every element a predicate matches, narrowed to a scope when one is named.


Type Literal ​

{ mode?: SelectionTextMode; scope?: ScopeInput; text: string; }

Every node a text search finds, narrowed to a scope when one is named.

With no mode, the text may carry one as a prefix: exact:, regex:, or <attribute>: (id:a17, type:person), and anything else is a case-insensitive substring search over the node's id and its attribute values. See SelectionTextMode. A leading = makes the rest an expression, exactly as { where } reads it, which selects edges as well.


Type Literal ​

{ ids: readonly NodeId[]; }

A list of ids, which may name nodes, edges, or nothing at all: a pasted column of text, or the ids the element handed out (a neighbor, a table record, a found element), numbers included. An id that names nothing comes back on unmatched, as text.


Type Literal ​

{ scope: ScopeInput; }

Everything a scope covers. An inline { define } may name edges by session edge id.


Type Literal ​

{ top: ResultRef & object; }

The highest-ranked elements of a finished run. A tie group is taken whole and only when it fits inside n, so this can select fewer than n elements, or none. See TopRanking in the results types. With no field, the run's primary field is ranked.


Type Literal ​

{ above: ResultRef & object; }

Every element of a finished run above a threshold. With no field, the run's primary field is read.


Type Literal ​

{ range: ResultRef & object; }

Every element of a finished run whose value lies from min to max, both inclusive, the way a range filter reads them. A missing bound is open. A histogram brush passes the first bar's from and the last bar's to: exact for a per-value or whole-number histogram; on a banded continuous field a value exactly on the last bar's upper edge comes too.


Type Literal ​

{ edgesBetween: true; }

The edges whose endpoints are both selected. Names no nodes.


Type Literal ​

{ invert: true; }

Everything that is not selected, in both halves.


Type Literal ​

{ note: NoteId; target?: number; }

What a note is about: its node, edge, set and item targets, or only the one at target. A target not in the graph is skipped and counted in SelectionDelta.skipped; a graph or result target names no elements.