UNPKG

rlayers

Version:

React Components for OpenLayers

14 lines 647 B
import { default as KeyboardPan } from 'ol/interaction/KeyboardPan'; import { default as RBaseInteraction } from './RBaseInteraction'; /** Pan with the arrow keys on the keyboard */ class RKeyboardPan extends RBaseInteraction { createOL(props) { this.classProps = RKeyboardPan.classProps; return new KeyboardPan(Object.keys(props) .filter((p) => this.classProps.includes(p)) .reduce((ac, p) => (Object.assign(Object.assign({}, ac), { [p]: props[p] })), {})); } } RKeyboardPan.classProps = ['condition', 'duration', 'pixelDelta']; export default RKeyboardPan; //# sourceMappingURL=RKeyboardPan.js.map