UNPKG

rlayers

Version:

React Components for OpenLayers

29 lines 1.29 kB
import { MapBrowserEvent } from 'ol'; import { Pixel } from 'ol/pixel'; import { default as DragBox, DragBoxEvent } from 'ol/interaction/DragBox'; import { default as RPointer } from './RPointer'; /** * @propsfor RDragBox */ export interface RDragBoxProps { /** A CSS class to be used for the box */ className?: string; /** An optional OpenLayers condition */ condition?: (e: MapBrowserEvent<PointerEvent | KeyboardEvent | WheelEvent>) => boolean; /** Minimum area that needs to be selected */ minArea?: number; /** An optional OpenLayers condition */ boxEndCondition?: (this: RDragBox, e: MapBrowserEvent<PointerEvent | KeyboardEvent | WheelEvent>, p1: Pixel, p2: Pixel) => boolean; /** Called when the user starts dragging */ onBoxStart?: (this: RDragBox, e: DragBoxEvent) => void; /** Called on selection * (note that this is the OpenLayers event, not the constructor property) */ onBoxEnd?: (this: RDragBox, e: DragBoxEvent) => void; } /** A dragbox, can be used for selecting features, see `RDragZoom` for zooming */ export default class RDragBox extends RPointer<RDragBoxProps> { protected static classProps: string[]; ol: DragBox; createOL(props: RDragBoxProps): DragBox; } //# sourceMappingURL=RDragBox.d.ts.map