Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e): jscodeshift --transform ts.js src
This commit is contained in:
@@ -10,7 +10,7 @@ import {clamp} from '../math.js';
|
||||
/**
|
||||
* Object literal with config options for interactions.
|
||||
* @typedef {Object} InteractionOptions
|
||||
* @property {function(module:ol/MapBrowserEvent):boolean} handleEvent
|
||||
* @property {function(import("../MapBrowserEvent.js").default):boolean} handleEvent
|
||||
* Method called by the map to notify the interaction that a browser event was
|
||||
* dispatched to the map. If the function returns a falsy value, propagation of
|
||||
* the event to other interactions in the map's interactions chain will be
|
||||
@@ -33,21 +33,21 @@ import {clamp} from '../math.js';
|
||||
*/
|
||||
class Interaction extends BaseObject {
|
||||
/**
|
||||
* @param {module:ol/interaction/Interaction~InteractionOptions} options Options.
|
||||
* @param {InteractionOptions} options Options.
|
||||
*/
|
||||
constructor(options) {
|
||||
super();
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/PluggableMap}
|
||||
* @type {import("../PluggableMap.js").default}
|
||||
*/
|
||||
this.map_ = null;
|
||||
|
||||
this.setActive(true);
|
||||
|
||||
/**
|
||||
* @type {function(module:ol/MapBrowserEvent):boolean}
|
||||
* @type {function(import("../MapBrowserEvent.js").default):boolean}
|
||||
*/
|
||||
this.handleEvent = options.handleEvent;
|
||||
|
||||
@@ -65,7 +65,7 @@ class Interaction extends BaseObject {
|
||||
|
||||
/**
|
||||
* Get the map associated with this interaction.
|
||||
* @return {module:ol/PluggableMap} Map.
|
||||
* @return {import("../PluggableMap.js").default} Map.
|
||||
* @api
|
||||
*/
|
||||
getMap() {
|
||||
@@ -86,7 +86,7 @@ class Interaction extends BaseObject {
|
||||
* Remove the interaction from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {module:ol/PluggableMap} map Map.
|
||||
* @param {import("../PluggableMap.js").default} map Map.
|
||||
*/
|
||||
setMap(map) {
|
||||
this.map_ = map;
|
||||
@@ -95,8 +95,8 @@ class Interaction extends BaseObject {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {module:ol/coordinate~Coordinate} delta Delta.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {import("../coordinate.js").Coordinate} delta Delta.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
export function pan(view, delta, opt_duration) {
|
||||
@@ -118,9 +118,9 @@ export function pan(view, delta, opt_duration) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {number|undefined} rotation Rotation.
|
||||
* @param {module:ol/coordinate~Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
export function rotate(view, rotation, opt_anchor, opt_duration) {
|
||||
@@ -130,9 +130,9 @@ export function rotate(view, rotation, opt_anchor, opt_duration) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {number|undefined} rotation Rotation.
|
||||
* @param {module:ol/coordinate~Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
export function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration) {
|
||||
@@ -154,9 +154,9 @@ export function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duratio
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {number|undefined} resolution Resolution to go to.
|
||||
* @param {module:ol/coordinate~Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
* @param {number=} opt_direction Zooming direction; > 0 indicates
|
||||
* zooming out, in which case the constraints system will select
|
||||
@@ -174,9 +174,9 @@ export function zoom(view, resolution, opt_anchor, opt_duration, opt_direction)
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {number} delta Delta from previous zoom level.
|
||||
* @param {module:ol/coordinate~Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
export function zoomByDelta(view, delta, opt_anchor, opt_duration) {
|
||||
@@ -212,9 +212,9 @@ export function zoomByDelta(view, delta, opt_anchor, opt_duration) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/View} view View.
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {number|undefined} resolution Resolution to go to.
|
||||
* @param {module:ol/coordinate~Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
export function zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration) {
|
||||
|
||||
Reference in New Issue
Block a user