import { Cartesian2, Cartesian3, CesiumWidget, Entity, PositionProperty, ScreenSpaceEventType, Viewer } from "cesium"; export declare type Context = { position?: Cartesian3; screenPosition: Cartesian2; initialPosition?: PositionProperty; initialScreenPosition: Cartesian2; }; export declare type Options = { /** If true, prevent dnd to be automatically enabled. */ initialDisabled?: boolean; /** The number of milliseconds to wait before starting the drag */ dragDelay?: number; dragInputType?: ScreenSpaceEventType; draggingInputType?: ScreenSpaceEventType; dropInputType?: ScreenSpaceEventType; /** If false is returned, dragging will not start. */ onDrag?: (e: Entity, position: Cartesian3 | undefined, context: Context) => void | boolean; /** * If undefined is returned, new position will be automatically set to the entity. (default) * If false is returned, new position will not be set to the entity. * Otherwise, the return value will be set as new position to the entity. */ onDragging?: (e: Entity, position: Cartesian3 | undefined, context: Context & { previousScreenPosition: Cartesian2; }) => void | false | Cartesian3; /** * If false is returned, new position will not be set to the entity and position of the entity will be reverted. * Otherwise, new position will be automatically set to the entity. */ onDrop?: (e: Entity, position: Cartesian3 | undefined, context: Context) => void | boolean; }; export default class CesiumDnD { viewer: Viewer | CesiumWidget; options?: Options; private _timeout?; private _handler?; private _initialEnableRotate; private _initialEnableTranslate; private _initialPosition?; private _initialHeight?; private _initialScreenPosition?; private _entity?; private _position; private _ellipsoid?; private _callbackProperty; constructor(viewer: Viewer | CesiumWidget, options?: Options); get isDragging(): boolean; enable(): void; disable(): void; get isActive(): boolean; cancelDragging: () => void; private _handleDrag; private _handleDragging; private _handleDrop; private _pick; private _context; private _convertCartesian2ToPosition; private _resetHeight; private static enlargeEllipsoid; }