UNPKG

rlayers

Version:

React Components for OpenLayers

14 lines 643 B
import { default as DragBox } from 'ol/interaction/DragBox'; import { default as RPointer } from './RPointer'; /** A dragbox, can be used for selecting features, see `RDragZoom` for zooming */ class RDragBox extends RPointer { createOL(props) { this.classProps = RDragBox.classProps; return new DragBox(Object.keys(props) .filter((p) => this.classProps.includes(p)) .reduce((ac, p) => (Object.assign(Object.assign({}, ac), { [p]: props[p] })), {})); } } RDragBox.classProps = ['className', 'condition', 'minArea', 'boxEndCondition']; export default RDragBox; //# sourceMappingURL=RDragBox.js.map