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