UNPKG

@deltares/fews-web-oc-charts

Version:
55 lines (54 loc) 1.42 kB
import { Axes } from '../Axes'; import { Visitor } from './visitor'; import { ModifierKey } from '../Utils'; export declare enum PanningDirection { X = "x", Y = "y", XY = "xy" } export declare enum MouseButton { Left = 0, Middle = 1 } export interface PanHandlerOptions { mouseButton?: MouseButton; modifierKey?: ModifierKey; direction?: PanningDirection; startEnabled?: boolean; changeHoveringCursor?: boolean; changePanningCursor?: boolean; hoveringCursor?: string; panningCursor?: string; } export declare class PanHandler implements Visitor { private id; private allAxes; private enabled; private isPanningEnabled; private isPanning; private mouseButton; private modifierKey; private direction; private changeHoveringCursor; private changePanningCursor; private hoveringCursor; private panningCursor; private keyDownCallback; private keyUpCallback; constructor(options?: PanHandlerOptions); private get mouseDownHandlerId(); visit(axes: Axes): void; redraw(): void; isEnabled(): boolean; enable(): void; disable(): void; destroy(): void; private enablePanning; private disablePanning; private enablePanningForAxes; private disablePanningForAxes; private onKeyDown; private onKeyUp; private onMouseDown; private createAxisUpdateCallbacks; }