The widget or grid a controller saves and restores. A grid is { capture: () => grid.getWorkspace(), apply: p => grid.applyWorkspace(p) }.

interface LayoutTarget {
    apply(payload: WorkspacePayload): LayoutApplyReport;
    capture(): WorkspacePayload;
    subscribe(listener: () => void): () => void;
    suspended(): boolean;
}

Methods

  • Called on each change the user makes. Without it the host calls changed(). Returns the unsubscribe.

    Parameters

    • listener: () => void

    Returns () => void

  • True while the target shows something other than the layout the user is building, as a chart does during a replay: its bars stop at a moment in the past and a replay may change the view on every step. Autosave waits and open is refused until it turns false, which the target announces through its subscribe listener (or the host through changed()). A save the user asks for still goes through. Since 2.5.10.

    Returns boolean