Move ScaleLineOptions to ol/control/ScaleLine
This commit is contained in:
@@ -5,58 +5,6 @@
|
|||||||
let olx;
|
let olx;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{className: (string|undefined),
|
|
||||||
* minWidth: (number|undefined),
|
|
||||||
* render: (function(ol.MapEvent)|undefined),
|
|
||||||
* target: (Element|string|undefined),
|
|
||||||
* units: (ol.control.ScaleLineUnits|string|undefined)}}
|
|
||||||
*/
|
|
||||||
olx.control.ScaleLineOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CSS Class name. Default is `ol-scale-line`.
|
|
||||||
* @type {string|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.control.ScaleLineOptions.prototype.className;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Minimum width in pixels. Default is `64`.
|
|
||||||
* @type {number|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.control.ScaleLineOptions.prototype.minWidth;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function called when the control should be re-rendered. This is called
|
|
||||||
* in a requestAnimationFrame callback.
|
|
||||||
* @type {function(ol.MapEvent)|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.control.ScaleLineOptions.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.ScaleLineOptions.prototype.target;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Units. Default is `metric`.
|
|
||||||
* @type {ol.control.ScaleLineUnits|string|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.control.ScaleLineOptions.prototype.units;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{duration: (number|undefined),
|
* @typedef {{duration: (number|undefined),
|
||||||
* className: (string|undefined),
|
* className: (string|undefined),
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} control_ScaleLineOptions
|
|
||||||
* @property {string|undefined} className CSS Class name. Default is `ol-scale-line`.
|
|
||||||
* @property {number|undefined} minWidth Minimum width in pixels. Default is `64`.
|
|
||||||
* @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 {ol.control.ScaleLineUnits|string|undefined} units Units. Default is `metric`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} control_RotateOptions
|
* @typedef {Object} control_RotateOptions
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-rotate`.
|
* @property {string|undefined} className CSS class name. Default is `ol-rotate`.
|
||||||
|
|||||||
@@ -25,6 +25,18 @@ const UNITS = 'units';
|
|||||||
const LEADING_DIGITS = [1, 2, 5];
|
const LEADING_DIGITS = [1, 2, 5];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Options
|
||||||
|
* @property {string|undefined} className CSS Class name. Default is `'ol-scale-line'`.
|
||||||
|
* @property {number|undefined} minWidth Minimum width in pixels. Default is `64`.
|
||||||
|
* @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 {ol.control.ScaleLineUnits|string|undefined} units Units. Default is `'metric'`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A control displaying rough y-axis distances, calculated for the center of the
|
* A control displaying rough y-axis distances, calculated for the center of the
|
||||||
@@ -37,7 +49,7 @@ const LEADING_DIGITS = [1, 2, 5];
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {olx.control.ScaleLineOptions=} opt_options Scale line options.
|
* @param {module:ol/control/ScaleLine~Options=} opt_options Scale line options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
const ScaleLine = function(opt_options) {
|
const ScaleLine = function(opt_options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user