/** * PanTool - Right-click pan/drag navigation * * Extracted from DrawToolCore.paintOnCanvas() closure. * Handles right-click drag to reposition the canvas view. */ import { BaseTool } from "./BaseTool"; import type { ToolContext } from "./BaseTool"; import type { PanHostDeps } from "./ToolHost"; export declare class PanTool extends BaseTool { /** Right mouse button currently held */ private rightClicked; /** Pan drag offset X (clientX − canvas.offsetLeft at drag start) */ private panMoveInnerX; /** Pan drag offset Y (clientY − canvas.offsetTop at drag start) */ private panMoveInnerY; private callbacks; /** * Bound handler reference for pointermove so we can add/remove it. * Arrow function preserves `this` binding. */ private readonly boundPointerMove; constructor(ctx: ToolContext, callbacks: PanHostDeps); /** Whether a pan drag is currently active */ get isActive(): boolean; /** * Called on right-click pointerdown. * Captures initial offsets and registers pointermove listener. */ onPointerDown(e: MouseEvent): void; /** * Called on pointerup (button === 2). * Cleans up listeners and restores cursor. */ onPointerUp(e: MouseEvent, defaultCursor: string): void; /** * Called on pointerleave while pan is active. * Resets state and removes listener. */ onPointerLeave(): void; /** Reset pan state (called when paintOnCanvas re-initializes) */ reset(): void; /** * Pointermove handler — updates canvas position during drag. */ private handlePointerMove; }