diff --git a/externs/olx.js b/externs/olx.js index 41bd1edd78..6ea0e80913 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,86 +5,6 @@ let olx; -/** - * @typedef {{duration: (number|undefined), - * className: (string|undefined), - * zoomInLabel: (string|Element|undefined), - * zoomOutLabel: (string|Element|undefined), - * zoomInTipLabel: (string|undefined), - * zoomOutTipLabel: (string|undefined), - * delta: (number|undefined), - * target: (Element|string|undefined)}} - */ -olx.control.ZoomOptions; - - -/** - * Animation duration in milliseconds. Default is `250`. - * @type {number|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.duration; - - -/** - * CSS class name. Default is `ol-zoom`. - * @type {string|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.className; - - -/** - * Text label to use for the zoom-in button. Default is `+`. - * Instead of text, also an element (e.g. a `span` element) can be used. - * @type {string|Element|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.zoomInLabel; - - -/** - * Text label to use for the zoom-out button. Default is `-`. - * Instead of text, also an element (e.g. a `span` element) can be used. - * @type {string|Element|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.zoomOutLabel; - - -/** - * Text label to use for the button tip. Default is `Zoom in` - * @type {string|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.zoomInTipLabel; - - -/** - * Text label to use for the button tip. Default is `Zoom out` - * @type {string|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.zoomOutTipLabel; - - -/** - * The zoom delta applied on each click. - * @type {number|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.delta; - - -/** - * Specify a target if you want the control to be rendered outside of the map's - * viewport. - * @type {Element|string|undefined} - * @api - */ -olx.control.ZoomOptions.prototype.target; - - /** * @typedef {{className: (string|undefined), * duration: (number|undefined), diff --git a/externs/xol.js b/externs/xol.js index ada3af15d8..7f887bf640 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,20 +1,4 @@ -/** - * @typedef {Object} control_ZoomOptions - * @property {number|undefined} duration Animation duration in milliseconds. Default is `250`. - * @property {string|undefined} className CSS class name. Default is `ol-zoom`. - * @property {string|Element|undefined} zoomInLabel Text label to use for the zoom-in button. Default is `+`. - * Instead of text, also an element (e.g. a `span` element) can be used. - * @property {string|Element|undefined} zoomOutLabel Text label to use for the zoom-out button. Default is `-`. - * Instead of text, also an element (e.g. a `span` element) can be used. - * @property {string|undefined} zoomInTipLabel Text label to use for the button tip. Default is `Zoom in` - * @property {string|undefined} zoomOutTipLabel Text label to use for the button tip. Default is `Zoom out` - * @property {number|undefined} delta The zoom delta applied on each click. - * @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_ZoomSliderOptions * @property {string|undefined} className CSS class name. diff --git a/src/ol/control/Zoom.js b/src/ol/control/Zoom.js index 1d4c9f4be5..46866ef5ad 100644 --- a/src/ol/control/Zoom.js +++ b/src/ol/control/Zoom.js @@ -8,6 +8,25 @@ import Control from '../control/Control.js'; import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js'; import {easeOut} from '../easing.js'; + +/** + * @typedef {Object} Options + * @property {number|undefined} duration Animation duration in milliseconds. Default is `250`. + * @property {string|undefined} className CSS class name. Default is `'ol-zoom'`. + * @property {string|Element|undefined} zoomInLabel Text label to use for the zoom-in + * button. Default is `'+'`. Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string|Element|undefined} zoomOutLabel Text label to use for the zoom-out button. + * Default is `'-'`. Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string|undefined} zoomInTipLabel Text label to use for the button tip. Default is + * `'Zoom in'`. + * @property {string|undefined} zoomOutTipLabel Text label to use for the button tip. Default is + * `'Zoom out'`. + * @property {number|undefined} delta The zoom delta applied on each click. + * @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 with 2 buttons, one for zoom in and one for zoom out. @@ -16,7 +35,7 @@ import {easeOut} from '../easing.js'; * * @constructor * @extends {ol.control.Control} - * @param {olx.control.ZoomOptions=} opt_options Zoom options. + * @param {module:ol/control/Zoom~Options=} opt_options Zoom options. * @api */ const Zoom = function(opt_options) {