Move MousePositionOptions to ol/control/MousePosition

This commit is contained in:
Tim Schaub
2018-03-11 10:52:37 -06:00
parent 5dcfa1137d
commit e059a50131
3 changed files with 18 additions and 75 deletions

View File

@@ -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),

View File

@@ -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).

View File

@@ -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
*/