diff --git a/externs/olx.js b/externs/olx.js index 215b3d5227..b8952a324d 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -12,67 +12,6 @@ let olx; olx.control; -/** - * @typedef {{className: (string|undefined), - * coordinateFormat: (module:ol/coordinate~CoordinateFormat|undefined), - * projection: ol.ProjectionLike, - * render: (function(ol.MapEvent)|undefined), - * target: (Element|string|undefined), - * undefinedHTML: (string|undefined)}} - */ -olx.control.MousePositionOptions; - - -/** - * CSS class name. Default is `ol-mouse-position`. - * @type {string|undefined} - * @api - */ -olx.control.MousePositionOptions.prototype.className; - - -/** - * Coordinate format. - * @type {module:ol/coordinate~CoordinateFormat|undefined} - * @api - */ -olx.control.MousePositionOptions.prototype.coordinateFormat; - - -/** - * Projection. - * @type {ol.ProjectionLike} - * @api - */ -olx.control.MousePositionOptions.prototype.projection; - - -/** - * Function called when the control should be re-rendered. This is called - * in a requestAnimationFrame callback. - * @type {function(ol.MapEvent)|undefined} - * @api - */ -olx.control.MousePositionOptions.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.MousePositionOptions.prototype.target; - - -/** - * Markup for undefined coordinates. Default is `` (empty string). - * @type {string|undefined} - * @api - */ -olx.control.MousePositionOptions.prototype.undefinedHTML; - - /** * @typedef {{collapsed: (boolean|undefined), * collapseLabel: (string|Element|undefined), diff --git a/externs/xol.js b/externs/xol.js index 4dcb5a9ae3..2f75f9813b 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,17 +1,4 @@ -/** - * @typedef {Object} control_MousePositionOptions - * @property {string|undefined} className CSS class name. Default is `ol-mouse-position`. - * @property {module:ol/coordinate~CoordinateFormat|undefined} coordinateFormat Coordinate format. - * @property {ol.ProjectionLike} projection Projection. - * @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. - * @property {string|undefined} undefinedHTML Markup for undefined coordinates. Default is `` (empty string). - */ - - /** * @typedef {Object} control_OverviewMapOptions * @property {boolean|undefined} collapsed Whether the control should start collapsed or not (expanded). diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 0909395070..5fc94ade3c 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -21,6 +21,23 @@ const PROJECTION = 'projection'; const COORDINATE_FORMAT = 'coordinateFormat'; +/** + * @typedef {Object} Options + * @property {string|undefined} className CSS class name. Default is + * `'ol-mouse-position'`. + * @property {module:ol/coordinate~CoordinateFormat|undefined} coordinateFormat + * Coordinate format. + * @property {ol.ProjectionLike} projection Projection. + * @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. + * @property {string|undefined} undefinedHTML Markup for undefined coordinates. + * Default is `''` (empty string). + */ + + /** * @classdesc * A control to show the 2D coordinates of the mouse cursor. By default, these @@ -30,7 +47,7 @@ const COORDINATE_FORMAT = 'coordinateFormat'; * * @constructor * @extends {ol.control.Control} - * @param {olx.control.MousePositionOptions=} opt_options Mouse position + * @param {module:ol/control/MousePosition~Options=} opt_options Mouse position * options. * @api */