diff --git a/externs/olx.js b/externs/olx.js index 631df3239d..47c67ff5f6 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -12,41 +12,6 @@ let olx; olx.control; -/** - * @typedef {{element: (Element|undefined), - * render: (function(ol.MapEvent)|undefined), - * target: (Element|string|undefined)}} - */ -olx.control.ControlOptions; - - -/** - * The element is the control's container element. This only needs to be - * specified if you're developing a custom control. - * @type {Element|undefined} - * @api - */ -olx.control.ControlOptions.prototype.element; - - -/** - * Function called when the control should be re-rendered. This is called - * in a requestAnimationFrame callback. - * @type {function(ol.MapEvent)|undefined} - * @api - */ -olx.control.ControlOptions.prototype.render; - - -/** - * Specify a target if you want the control to be rendered outside of the map's - * viewport. - * @type {Element|string|undefined} - * @api - */ -olx.control.ControlOptions.prototype.target; - - /** * @typedef {{className: (string|undefined), * label: (string|Element|undefined), diff --git a/externs/xol.js b/externs/xol.js index 0a3b26c149..e538c11496 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,15 +1,4 @@ -/** - * @typedef {Object} control_ControlOptions - * @property {Element|undefined} element The element is the control's container element. This only needs to be - * specified if you're developing a custom control. - * @property {function(ol.MapEvent)|undefined} render Function called when the control should be re-rendered. This is called - * in a requestAnimationFrame callback. - * @property {Element|string|undefined} target Specify a target if you want the control to be rendered outside of the map's - * viewport. - */ - - /** * @typedef {Object} control_FullScreenOptions * @property {string|undefined} className CSS class name. Default is `ol-full-screen`. diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 92e35f208e..489369122b 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -8,6 +8,20 @@ import BaseObject from '../Object.js'; import {removeNode} from '../dom.js'; import {listen, unlistenByKey} from '../events.js'; + +/** + * @typedef {Object} Options + * @property {Element|undefined} element The element is the control's + * container element. This only needs to be specified if you're developing + * a custom control. + * @property {function(ol.MapEvent)|undefined} render Function called when + * the control should be re-rendered. This is called in a `requestAnimationFrame` + * callback. + * @property {Element|string|undefined} target Specify a target if you want + * the control to be rendered outside of the map's viewport. + */ + + /** * @classdesc * A control is a visible widget with a DOM element in a fixed position on the @@ -34,7 +48,7 @@ import {listen, unlistenByKey} from '../events.js'; * @constructor * @extends {ol.Object} * @implements {oli.control.Control} - * @param {olx.control.ControlOptions} options Control options. + * @param {module:ol/control/Control~Options} options Control options. * @api */ const Control = function(options) {