Dockview
    Preparing search index...

    Interface ISmartGuidesHost

    The narrow surface the Smart Guides service needs from the host (DockviewComponent). The service owns candidate generation, snap resolution and the guide overlay; it only reads the floating container (for guide geometry) and the drag-end signal from the host, never mutating layout. The per-frame snap itself is driven by the component composing the service into the float drag loop's transformFloatingGroupDrag, so it is not a host member.

    interface ISmartGuidesHost {
        onDidEndFloatingGroupDrag: DockviewEvent<DockviewGroupPanel>;
        onDidStartFloatingGroupDrag: DockviewEvent<DockviewGroupPanel>;
        options: DockviewComponentOptions;
        getFloatingContainer(): HTMLElement;
        getFloatingGroupSnapshots(
            exclude: DockviewGroupPanel,
        ): readonly { box: Box; group: DockviewGroupPanel }[];
        getGridSplitterRects(): Box[];
        mergeFloatInto(
            dragged: DockviewGroupPanel,
            target: DockviewGroupPanel,
            position: SmartGuidesSnapPosition,
        ): void;
    }

    Implemented by

    Index

    Properties

    onDidEndFloatingGroupDrag: DockviewEvent<DockviewGroupPanel>

    Fires with the dragged group when a floating group's move-drag ends (pointerup / cancel); the signal to tear down the guides and per-drag state. A resize-end fires it too; with no active drag session that is a harmless no-op.

    onDidStartFloatingGroupDrag: DockviewEvent<DockviewGroupPanel>

    Fires with the dragged group the first time a floating group move-drag actually moves; the signal to (re)build per-drag state from a clean slate. Tears down any session left over from a drag that ended without a normal pointerup (e.g. a redock long-press, which aborts without an end event).

    Methods

    • The positioning parent for floating groups, in whose coordinate space the guide overlay is drawn (container-relative, never client/viewport space). This is the same element floats are placed in (_floatingOverlayHost ?? gridview.element).

      Returns HTMLElement

    • The underlying grid's splitter (sash) rectangles, in the same container-relative space, for the optional snapTargets.splitters source. Empty when there are no sashes.

      Returns Box[]