rlayers
Version:
React Components for OpenLayers
14 lines • 581 B
JavaScript
import { default as PinchZoom } from 'ol/interaction/PinchZoom';
import { default as RBaseInteraction } from './RBaseInteraction';
/** Zoom by pinching */
class RPinchZoom extends RBaseInteraction {
createOL(props) {
this.classProps = RPinchZoom.classProps;
return new PinchZoom(Object.keys(props)
.filter((p) => this.classProps.includes(p))
.reduce((ac, p) => (Object.assign(Object.assign({}, ac), { [p]: props[p] })), {}));
}
}
RPinchZoom.classProps = ['duration'];
export default RPinchZoom;
//# sourceMappingURL=RPinchZoom.js.map