UNPKG

rlayers

Version:

React Components for OpenLayers

14 lines 662 B
import { default as DragZoom } from 'ol/interaction/DragZoom'; import { default as RBaseInteraction } from './RBaseInteraction'; /** Zoom by dragging a box, see `RDragBox` for selecting features */ class RDragZoom extends RBaseInteraction { createOL(props) { this.classProps = RDragZoom.classProps; return new DragZoom(Object.keys(props) .filter((p) => this.classProps.includes(p)) .reduce((ac, p) => (Object.assign(Object.assign({}, ac), { [p]: props[p] })), {})); } } RDragZoom.classProps = ['className', 'condition', 'duration', 'out', 'minArea']; export default RDragZoom; //# sourceMappingURL=RDragZoom.js.map