dockview-core
Version:
Zero dependency layout manager supporting tabs, groups, grids and splitviews for vanilla TypeScript
50 lines (49 loc) • 1.86 kB
TypeScript
import { Event } from '../events';
import { CompositeDisposable } from '../lifecycle';
import { AnchoredBox } from '../types';
export declare class Overlay extends CompositeDisposable {
private readonly options;
private readonly _element;
private readonly _onDidChange;
readonly onDidChange: Event<void>;
private readonly _onDidChangeEnd;
readonly onDidChangeEnd: Event<void>;
private readonly _onDidStartMoving;
/** Fires once per drag, the first time the float actually moves. */
readonly onDidStartMoving: Event<void>;
private readonly _dragMove;
private _dragCancelled;
private static readonly MINIMUM_HEIGHT;
private static readonly MINIMUM_WIDTH;
private verticalAlignment;
private horiziontalAlignment;
private _isVisible;
set minimumInViewportWidth(value: number | undefined);
set minimumInViewportHeight(value: number | undefined);
get element(): HTMLElement;
get isVisible(): boolean;
constructor(options: AnchoredBox & {
container: HTMLElement;
content: HTMLElement;
minimumInViewportWidth?: number;
minimumInViewportHeight?: number;
});
setVisible(isVisible: boolean): void;
bringToFront(): void;
setBounds(bounds?: Partial<AnchoredBox>): void;
toJSON(): AnchoredBox;
/**
* Abort an in-flight move-the-float drag. Used by the void container
* when a redock long-press fires after the move started, so the ghost
* gesture wins without the float continuing to follow the finger.
* Does not emit `onDidChangeEnd` because no change is being committed.
*/
cancelPendingDrag(): void;
setupDrag(dragTarget: HTMLElement, options?: {
inDragMode: boolean;
}): void;
private setupResize;
private getMinimumWidth;
private getMinimumHeight;
dispose(): void;
}