Skip to content

@graphty/graphty-element / session / SelectionTextMode

Type Alias: SelectionTextMode ​

SelectionTextMode = "substring" | "exact" | "regex" | "attribute"

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

How a text target decides whether an element matched.

  • substring: the id or an attribute value contains the text, ignoring case.
  • exact: the id or an attribute value is the text, exactly.
  • regex: the id or an attribute value matches the text as a regular expression.
  • attribute: the text is key:value, and the node's key (or its id, for id) is the value, ignoring case. A key no node carries is searched as plain substring text.