pivotick - v3.0.0
    Preparing search index...

    Interface Simplification

    interface Simplification {
        get matchQuery(): string | undefined;
        get openConfirmAbove(): number;
        close(group: GroupRef): void;
        colorOf(node: Node): string;
        defaultTitle(nodes: (string | Node)[]): string;
        getGroups(): GroupInfo[];
        getManualGroups(): ManualGroupRecord[];
        getRules(): SimplifyRuleStatus[];
        groupableIds(nodes: (string | Node)[]): string[];
        groupLanding(runId: string): void;
        groupNodes(nodes: (string | Node)[], title?: string): string | undefined;
        groupOf(node: string | Node): GroupInfo | undefined;
        isEnabled(): boolean;
        isLandingGrouped(runId: string): boolean;
        isManual(group: GroupRef): boolean;
        isPulledOut(node: string | Node): boolean;
        labelOf(info: GroupInfo): string;
        matchesIn(group: GroupInfo | GroupNode): number;
        onChange(listener: () => void): () => void;
        open(group: GroupRef): void;
        pullOut(nodes: NodeRef | NodeRef[]): void;
        putBack(nodes: NodeRef | NodeRef[]): void;
        renameGroup(group: GroupRef, title: string): void;
        ruleLabel(id: string): string;
        setManualGroups(records: ManualGroupRecord[]): void;
        setMatches(nodes: Node[], query?: string): void;
        setRuleEnabled(id: string, enabled: boolean): void;
        setRuleMinSize(id: string, minSize: number): void;
        setRules(rules: SimplifyRule[]): void;
        setRuleSetting(id: string, value: number): void;
        summary(): { folded: number; groups: number; shown: number; total: number };
        typeColor(info: GroupInfo, type: string): string;
        typeLabel(type: string | undefined, count: number): string;
        typesLabelOf(info: Pick<GroupInfo, "typeCounts">): string;
        ungroup(groups: GroupRef | GroupRef[]): void;
        ungroupLanding(runId: string): void;
    }
    Index

    Accessors

    Methods

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

      Parameters

      • nodes: (string | Node)[]

      Returns string

    • 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[]

    • 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

    • 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)[]
      • Optionaltitle: string

      Returns string | undefined

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

      Parameters

      • listener: () => void

      Returns () => void

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

      Parameters

      • group: GroupRef

      Returns void

    • 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

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

      Parameters

      • group: GroupRef
      • title: string

      Returns void

    • 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

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

      Parameters

      • id: string
      • enabled: boolean

      Returns void

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

      Parameters

      • id: string
      • minSize: number

      Returns void

    • 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

    • 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 { folded: number; groups: number; shown: number; total: number }

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

      Parameters

      • type: string | undefined
      • count: number

      Returns string

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

      Parameters

      • groups: GroupRef | GroupRef[]

      Returns void