Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e): jscodeshift --transform ts.js src
This commit is contained in:
@@ -9,7 +9,7 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number} [duration=100] Animation duration in milliseconds.
|
||||
* @property {module:ol/events/condition~Condition} [condition] A function that
|
||||
* @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~targetNotEditable}.
|
||||
@@ -32,7 +32,7 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
|
||||
*/
|
||||
class KeyboardZoom extends Interaction {
|
||||
/**
|
||||
* @param {module:ol/interaction/KeyboardZoom~Options=} opt_options Options.
|
||||
* @param {Options=} opt_options Options.
|
||||
*/
|
||||
constructor(opt_options) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class KeyboardZoom extends Interaction {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/events/condition~Condition}
|
||||
* @type {import("../events/condition.js").Condition}
|
||||
*/
|
||||
this.condition_ = options.condition ? options.condition : targetNotEditable;
|
||||
|
||||
@@ -69,9 +69,9 @@ class KeyboardZoom extends Interaction {
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a
|
||||
* `KeyEvent`, and decides whether to zoom in or out (depending on whether the
|
||||
* key pressed was '+' or '-').
|
||||
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {module:ol/interaction/KeyboardZoom}
|
||||
* @this {import("./KeyboardZoom.js").default}
|
||||
*/
|
||||
function handleEvent(mapBrowserEvent) {
|
||||
let stopEvent = false;
|
||||
|
||||
Reference in New Issue
Block a user