You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.5 KiB
73 lines
2.5 KiB
export default KeyboardPan;
|
|
export type Options = {
|
|
/**
|
|
* A function that
|
|
* takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
|
|
* boolean to indicate whether that event should be handled. Default is
|
|
* {@link module :ol/events/condition.noModifierKeys} and
|
|
* {@link module :ol/events/condition.targetNotEditable}.
|
|
*/
|
|
condition?: import("../events/condition.js").Condition | undefined;
|
|
/**
|
|
* Animation duration in milliseconds.
|
|
*/
|
|
duration?: number | undefined;
|
|
/**
|
|
* The amount of pixels to pan on each key
|
|
* press.
|
|
*/
|
|
pixelDelta?: number | undefined;
|
|
};
|
|
/**
|
|
* @typedef {Object} Options
|
|
* @property {import("../events/condition.js").Condition} [condition] A function that
|
|
* takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
|
|
* boolean to indicate whether that event should be handled. Default is
|
|
* {@link module:ol/events/condition.noModifierKeys} and
|
|
* {@link module:ol/events/condition.targetNotEditable}.
|
|
* @property {number} [duration=100] Animation duration in milliseconds.
|
|
* @property {number} [pixelDelta=128] The amount of pixels to pan on each key
|
|
* press.
|
|
*/
|
|
/**
|
|
* @classdesc
|
|
* Allows the user to pan the map using keyboard arrows.
|
|
* Note that, although this interaction is by default included in maps,
|
|
* the keys can only be used when browser focus is on the element to which
|
|
* the keyboard events are attached. By default, this is the map div,
|
|
* though you can change this with the `keyboardEventTarget` in
|
|
* {@link module:ol/Map~Map}. `document` never loses focus but, for any other
|
|
* element, focus will have to be on, and returned to, this element if the keys
|
|
* are to function.
|
|
* See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.
|
|
* @api
|
|
*/
|
|
declare class KeyboardPan extends Interaction {
|
|
/**
|
|
* @param {Options} [options] Options.
|
|
*/
|
|
constructor(options?: Options | undefined);
|
|
/**
|
|
* @private
|
|
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Browser event.
|
|
* @return {boolean} Combined condition result.
|
|
*/
|
|
private defaultCondition_;
|
|
/**
|
|
* @private
|
|
* @type {import("../events/condition.js").Condition}
|
|
*/
|
|
private condition_;
|
|
/**
|
|
* @private
|
|
* @type {number}
|
|
*/
|
|
private duration_;
|
|
/**
|
|
* @private
|
|
* @type {number}
|
|
*/
|
|
private pixelDelta_;
|
|
}
|
|
import Interaction from "./Interaction.js";
|
|
//# sourceMappingURL=KeyboardPan.d.ts.map
|