UNPKG

saltfish

Version:

An interactive video-guided tour system for web applications

50 lines 1.58 kB
/** * DragManager handles all drag-and-drop functionality for the player. * It's responsible for managing drag state, handling mouse events, * and updating player position during drag operations. */ export declare class DragManager { private playerElement; private playerRoot; private isDragging; private dragOffset; private justFinishedDragging; private dragStartPosition; private hasMoved; private resizeListener; private onDragStateChange; /** * Initializes the drag manager with the player elements * @param playerElement - The draggable player element * @param playerRoot - The root element that gets positioned * @param onDragStateChange - Callback for when drag state changes */ initialize(playerElement: HTMLElement, playerRoot: HTMLElement, onDragStateChange?: () => void): void; /** * Sets up drag handlers for the player */ private setupDragHandlers; /** * Updates the player position during drag operations * @param position - The new position coordinates * @param positionAlignment - The position alignment setting */ private updatePlayerPosition; /** * Checks if the UI is currently being dragged */ isCurrentlyDragging(): boolean; /** * Checks if dragging just finished */ hasJustFinishedDragging(): boolean; /** * Resets drag state */ resetDragState(): void; /** * Destroys the drag manager and cleans up resources */ destroy(): void; } //# sourceMappingURL=DragManager.d.ts.map