Skip to content

pivotick v3.0.0


pivotick / Simplification

Interface: Simplification ​

Defined in: Simplification/Simplification.ts:100

Accessors ​

matchQuery ​

Get Signature ​

get matchQuery(): string | undefined

Defined in: Simplification/Simplification.ts:551

What the matches set were matched on.

Returns ​

string | undefined


openConfirmAbove ​

Get Signature ​

get openConfirmAbove(): number

Defined in: Simplification/Simplification.ts:476

The members above which Open asks first (UI.simplify.openConfirmAbove).

Returns ​

number

Methods ​

close() ​

close(group): void

Defined in: Simplification/Simplification.ts:282

Fold an open group's members back into it.

Parameters ​

group ​

GroupRef

Returns ​

void


colorOf() ​

colorOf(node): string

Defined in: Simplification/Simplification.ts:513

The colour a dot is drawn in: UI.simplify.colorOf, else a node's style, or a group's own.

Parameters ​

node ​

Node

Returns ​

string


defaultTitle() ​

defaultTitle(nodes): string

Defined in: Simplification/Simplification.ts:429

The label these nodes would get from their types, what the title prompt starts from.

Parameters ​

nodes ​

(string | Node)[]

Returns ​

string


getGroups() ​

getGroups(): GroupInfo[]

Defined in: Simplification/Simplification.ts:235

Every group from the last run, open ones included, and those a later rule folded again: the group holding one lists its members too. summary().groups counts the closed groups the canvas draws.

Returns ​

GroupInfo[]


getManualGroups() ​

getManualGroups(): ManualGroupRecord[]

Defined in: Simplification/Simplification.ts:412

The hand-made groups, for a host to save.

Returns ​

ManualGroupRecord[]


getRules() ​

getRules(): SimplifyRuleStatus[]

Defined in: Simplification/Simplification.ts:158

Every rule, in run order, with what it did on the last run.

Returns ​

SimplifyRuleStatus[]


groupableIds() ​

groupableIds(nodes): string[]

Defined in: Simplification/Simplification.ts:441

The real nodes a selection stands for that a hand-made group may hold.

Parameters ​

nodes ​

(string | Node)[]

Returns ​

string[]


groupLanding() ​

groupLanding(runId): void

Defined in: Simplification/Simplification.ts:318

Land what this pivot run adds in groups, one per type. Call it with graph.pivots.candidates(pivotId).runId before pivots.ingest, so the nodes are never drawn loose; calling it after folds them on the next redraw. Adds the Pivot landings rule at the top when it is not declared, and switches it on.

Parameters ​

runId ​

string

Returns ​

void


groupNodes() ​

groupNodes(nodes, title?): string | undefined

Defined in: Simplification/Simplification.ts:360

Fold these nodes into one group of their own, titled title (unset or the default label: labelled by its types). A group among them gives its members. A node already in a hand-made group leaves it; annotated nodes and expanded clusters stay out. Returns the new group's id, or nothing when fewer than two nodes can be grouped.

Parameters ​

nodes ​

(string | Node)[]

title? ​

string

Returns ​

string | undefined


groupOf() ​

groupOf(node): GroupInfo | undefined

Defined in: Simplification/Simplification.ts:240

The group the first rule to fold this node put it in.

Parameters ​

node ​

string | Node

Returns ​

GroupInfo | undefined


isEnabled() ​

isEnabled(): boolean

Defined in: Simplification/Simplification.ts:144

Whether the feature is on at all (UI.simplify.enabled).

Returns ​

boolean


isLandingGrouped() ​

isLandingGrouped(runId): boolean

Defined in: Simplification/Simplification.ts:348

Whether this pivot run was asked to land in a group.

Parameters ​

runId ​

string

Returns ​

boolean


isManual() ​

isManual(group): boolean

Defined in: Simplification/Simplification.ts:406

Whether this group was made by hand.

Parameters ​

group ​

GroupRef

Returns ​

boolean


isPulledOut() ​

isPulledOut(node): boolean

Defined in: Simplification/Simplification.ts:308

Whether a node was pulled out of its group.

Parameters ​

node ​

string | Node

Returns ​

boolean


labelOf() ​

labelOf(info): string

Defined in: Simplification/Simplification.ts:488

A group's label: its title, else its parts joined, largest first.

Parameters ​

info ​

GroupInfo

Returns ​

string


matchesIn() ​

matchesIn(group): number

Defined in: Simplification/Simplification.ts:543

How many of a group's members are among the matches set.

Parameters ​

group ​

GroupInfo | GroupNode

Returns ​

number


onChange() ​

onChange(listener): () => void

Defined in: Simplification/Simplification.ts:562

Subscribe to changes of the grouping. Returns its own unsubscribe.

Parameters ​

listener ​

() => void

Returns ​

(): void

Returns ​

void


open() ​

open(group): void

Defined in: Simplification/Simplification.ts:277

Put a group's members back on the canvas. It stays open until closed or dissolved.

Parameters ​

group ​

GroupRef

Returns ​

void


pullOut() ​

pullOut(nodes): void

Defined in: Simplification/Simplification.ts:290

Take nodes out of their groups for the session; each stays a plain node until put back. Several at once regroup once.

Parameters ​

nodes ​

NodeRef | NodeRef[]

Returns ​

void


putBack() ​

putBack(nodes): void

Defined in: Simplification/Simplification.ts:301

Let pulled-out nodes be grouped again.

Parameters ​

nodes ​

NodeRef | NodeRef[]

Returns ​

void


renameGroup() ​

renameGroup(group, title): void

Defined in: Simplification/Simplification.ts:393

Retitle a hand-made group; an empty title labels it by its types again.

Parameters ​

group ​

GroupRef

title ​

string

Returns ​

void


ruleLabel() ​

ruleLabel(id): string

Defined in: Simplification/Simplification.ts:501

The name a rule goes by on its card, for a group's subtitle.

Parameters ​

id ​

string

Returns ​

string


setManualGroups() ​

setManualGroups(records): void

Defined in: Simplification/Simplification.ts:417

Replace the hand-made groups, as a host restoring them does. Not an undo step.

Parameters ​

records ​

ManualGroupRecord[]

Returns ​

void


setMatches() ​

setMatches(nodes, query): void

Defined in: Simplification/Simplification.ts:526

Mark a search's matches: a closed group holding some draws their share over its ring, and its tooltip counts them. An empty list clears them.

Parameters ​

nodes ​

Node[]

query ​

string = ''

Returns ​

void


setRuleEnabled() ​

setRuleEnabled(id, enabled): void

Defined in: Simplification/Simplification.ts:194

Switch one rule on or off. Switching a failed rule back on tries it again.

Parameters ​

id ​

string

enabled ​

boolean

Returns ​

void


setRuleMinSize() ​

setRuleMinSize(id, minSize): void

Defined in: Simplification/Simplification.ts:203

Set a rule's smallest group, clamped to 2–50. A rule with another setting has none.

Parameters ​

id ​

string

minSize ​

number

Returns ​

void


setRules() ​

setRules(rules): void

Defined in: Simplification/Simplification.ts:149

Replace the rules. Their order is the order they run in.

Parameters ​

rules ​

SimplifyRule[]

Returns ​

void


setRuleSetting() ​

setRuleSetting(id, value): void

Defined in: Simplification/Simplification.ts:212

Set a rule's one setting, what its stepper or slider does: the smallest group (2–50), the fewest links or core strength (1–10), or the Communities level (1–7).

Parameters ​

id ​

string

value ​

number

Returns ​

void


summary() ​

summary(): object

Defined in: Simplification/Simplification.ts:264

What the canvas holds: total top-level nodes pass the filters, folded of them sit in closed groups, and shown dots are drawn for them, groups of which are groups.

Returns ​

object

folded ​

folded: number

groups ​

groups: number

shown ​

shown: number

total ​

total: number


typeColor() ​

typeColor(info, type): string

Defined in: Simplification/Simplification.ts:506

The colour a member of this type is drawn in; '' is no type.

Parameters ​

info ​

GroupInfo

type ​

string

Returns ​

string


typeLabel() ​

typeLabel(type, count): string

Defined in: Simplification/Simplification.ts:481

The name of one part of a group, 12 × ip unless UI.simplify.typeLabel says otherwise.

Parameters ​

type ​

string | undefined

count ​

number

Returns ​

string


typesLabelOf() ​

typesLabelOf(info): string

Defined in: Simplification/Simplification.ts:493

A group's parts joined, largest first, whatever its title.

Parameters ​

info ​

Pick<GroupInfo, "typeCounts">

Returns ​

string


ungroup() ​

ungroup(groups): void

Defined in: Simplification/Simplification.ts:379

Remove hand-made groups, as one step; their members are drawn as they would be without them.

Parameters ​

groups ​

GroupRef | GroupRef[]

Returns ​

void


ungroupLanding() ​

ungroupLanding(runId): void

Defined in: Simplification/Simplification.ts:343

Let what this run added be drawn as plain nodes again.

Parameters ​

runId ​

string

Returns ​

void