Add signatures for once.

This commit is contained in:
Simon Seyock
2021-06-23 18:47:14 +02:00
committed by Andreas Hocevar
parent 1870a64984
commit d914006d51
25 changed files with 364 additions and 126 deletions
+14 -5
View File
@@ -32,6 +32,14 @@ const FullScreenEventType = {
LEAVEFULLSCREEN: 'leavefullscreen',
};
/***
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes|
* 'enterfullscreen'|'leavefullscreen', import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types, import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|
* 'enterfullscreen'|'leavefullscreen'|import("../ObjectEventType").Types>} FullScreenOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-full-screen'] CSS class name.
@@ -81,14 +89,15 @@ class FullScreen extends Control {
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes|
* 'enterfullscreen'|'leavefullscreen', import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types, import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|
* 'enterfullscreen'|'leavefullscreen'|import("../ObjectEventType").Types>}
* @type {FullScreenOnSignature}
*/
this.on;
/***
* @type {FullScreenOnSignature}
*/
this.once;
/**
* @private
* @type {string}
+14 -5
View File
@@ -22,6 +22,14 @@ const PROJECTION = 'projection';
*/
const COORDINATE_FORMAT = 'coordinateFormat';
/***
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:coordinateFormat'|'change:projection', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
* 'change:coordinateFormat'|'change:projection'>} MousePositionOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-mouse-position'] CSS class name.
@@ -69,14 +77,15 @@ class MousePosition extends Control {
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:coordinateFormat'|'change:projection', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
* 'change:coordinateFormat'|'change:projection'>}
* @type {MousePositionOnSignature}
*/
this.on;
/***
* @type {MousePositionOnSignature}
*/
this.once;
this.addChangeListener(PROJECTION, this.handleProjectionChanged_);
if (options.coordinateFormat) {
+14 -4
View File
@@ -37,6 +37,14 @@ const LEADING_DIGITS = [1, 2, 5];
*/
const DEFAULT_DPI = 25.4 / 0.28;
/***
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:units', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types
* |'change:units'>} ScaleLineOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-scale-line'] CSS Class name.
@@ -91,13 +99,15 @@ class ScaleLine extends Control {
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:units', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|'change:units'>}
* @type {ScaleLineOnSignature}
*/
this.on;
/***
* @type {ScaleLineOnSignature}
*/
this.once;
/**
* @private
* @type {HTMLElement}