pivotick - v2.0.1
    Preparing search index...

    Interface GraphHistoryLike

    A bounded, session-scoped history of what the canvas holds and shows: what was brought in, what was taken out, what was hidden.

    Reached as graph.history. Read it and drive it — the entry kinds are closed, so a consumer cannot record into it. Every entry names the specific elements it touched, which is what lets a sealed entry be skipped mid-span without the ones around it getting out of order.

    interface GraphHistoryLike {
        canRedo(): boolean;
        canUndo(): boolean;
        clear(): void;
        entries(): HistoryEntry[];
        on(listener: (history: GraphHistoryLike) => void): () => void;
        preview(
            throughEntryId: string,
            direction?: "undo" | "redo",
        ): HistoryPreview;
        redo(throughEntryId?: string): HistoryEntry[];
        redoable(): HistoryEntry[];
        undo(throughEntryId?: string): HistoryEntry[];
    }

    Implemented by

    Index

    Methods

    • What that span would touch — what drives the hover highlight and the menu's own copy.

      Parameters

      • throughEntryId: string
      • Optionaldirection: "undo" | "redo"

      Returns HistoryPreview

    • Undo the span running from the newest entry through throughEntryId; the newest entry alone by default. Lands as one dataBatchChanged.

      Parameters

      • OptionalthroughEntryId: string

      Returns HistoryEntry[]

      the entries actually reversed, newest first — sealed ones are passed over and are not in it.