Shorter module paths for default exports
This commit is contained in:
@@ -29,7 +29,7 @@ import {visibleAtResolution} from '../layer/Layer.js';
|
||||
* @property {string|Element} [collapseLabel='»'] Text label to use
|
||||
* for the expanded attributions button.
|
||||
* Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when
|
||||
* the control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||
* callback.
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ import {visibleAtResolution} from '../layer/Layer.js';
|
||||
* be changed by using a css selector for `.ol-attribution`.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/Attribution~Options=} opt_options Attribution options.
|
||||
* @api
|
||||
*/
|
||||
@@ -208,8 +208,8 @@ Attribution.prototype.getSourceAttributions_ = function(frameState) {
|
||||
|
||||
/**
|
||||
* Update the attribution element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/Attribution~Attribution}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/Attribution}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import {listen, unlistenByKey} from '../events.js';
|
||||
* @property {Element} [element] The element is the control's
|
||||
* container element. This only needs to be specified if you're developing
|
||||
* a custom control.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when
|
||||
* the control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||
* callback.
|
||||
* @property {Element|string} [target] Specify a target if you want
|
||||
@@ -45,7 +45,7 @@ import {listen, unlistenByKey} from '../events.js';
|
||||
* examples/custom-controls for an example of how to do this.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/Object~BaseObject}
|
||||
* @extends {module:ol/Object}
|
||||
* @implements {oli.control.Control}
|
||||
* @param {module:ol/control/Control~Options} options Control options.
|
||||
* @api
|
||||
@@ -68,7 +68,7 @@ const Control = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/PluggableMap~PluggableMap}
|
||||
* @type {module:ol/PluggableMap}
|
||||
*/
|
||||
this.map_ = null;
|
||||
|
||||
@@ -79,7 +79,7 @@ const Control = function(options) {
|
||||
this.listenerKeys = [];
|
||||
|
||||
/**
|
||||
* @type {function(module:ol/MapEvent~MapEvent)}
|
||||
* @type {function(module:ol/MapEvent)}
|
||||
*/
|
||||
this.render = options.render ? options.render : UNDEFINED;
|
||||
|
||||
@@ -103,7 +103,7 @@ Control.prototype.disposeInternal = function() {
|
||||
|
||||
/**
|
||||
* Get the map associated with this control.
|
||||
* @return {module:ol/PluggableMap~PluggableMap} Map.
|
||||
* @return {module:ol/PluggableMap} Map.
|
||||
* @api
|
||||
*/
|
||||
Control.prototype.getMap = function() {
|
||||
@@ -115,7 +115,7 @@ Control.prototype.getMap = function() {
|
||||
* Remove the control from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {module:ol/PluggableMap~PluggableMap} map Map.
|
||||
* @param {module:ol/PluggableMap} map Map.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ const getChangeType = (function() {
|
||||
*
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/FullScreen~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
|
||||
* @property {string} [className='ol-mouse-position'] CSS class name.
|
||||
* @property {module:ol/coordinate~CoordinateFormat} [coordinateFormat] Coordinate format.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when the
|
||||
* control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||
* callback.
|
||||
* @property {Element|string} [target] Specify a target if you want the
|
||||
@@ -47,7 +47,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
|
||||
* can be changed by using the css selector `.ol-mouse-position`.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/MousePosition~Options=} opt_options Mouse position
|
||||
* options.
|
||||
* @api
|
||||
@@ -96,7 +96,7 @@ const MousePosition = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
* @type {module:ol/proj/Projection}
|
||||
*/
|
||||
this.mapProjection_ = null;
|
||||
|
||||
@@ -119,8 +119,8 @@ inherits(MousePosition, Control);
|
||||
|
||||
/**
|
||||
* Update the mouseposition element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/MousePosition~MousePosition}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/MousePosition}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
@@ -154,19 +154,23 @@ MousePosition.prototype.handleProjectionChanged_ = function() {
|
||||
* @api
|
||||
*/
|
||||
MousePosition.prototype.getCoordinateFormat = function() {
|
||||
return /** @type {module:ol/coordinate~CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));
|
||||
return (
|
||||
/** @type {module:ol/coordinate~CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT))
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Return the projection that is used to report the mouse position.
|
||||
* @return {module:ol/proj/Projection~Projection|undefined} The projection to report mouse
|
||||
* @return {module:ol/proj/Projection|undefined} The projection to report mouse
|
||||
* position in.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
MousePosition.prototype.getProjection = function() {
|
||||
return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(PROJECTION));
|
||||
return (
|
||||
/** @type {module:ol/proj/Projection|undefined} */ (this.get(PROJECTION))
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -45,15 +45,15 @@ const MIN_RATIO = 0.1;
|
||||
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
|
||||
* @property {string|Element} [label='»'] Text label to use for the collapsed
|
||||
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {Array.<module:ol/layer/Layer~Layer>|module:ol/Collection~Collection.<module:ol/layer/Layer~Layer>} [layers]
|
||||
* @property {Array.<module:ol/layer/Layer>|module:ol/Collection.<module:ol/layer/Layer>} [layers]
|
||||
* Layers for the overview map. If not set, then all main map layers are used
|
||||
* instead.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when the control
|
||||
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
|
||||
* @property {Element|string} [target] Specify a target if you want the control
|
||||
* to be rendered outside of the map's viewport.
|
||||
* @property {string} [tipLabel='Overview map'] Text label to use for the button tip.
|
||||
* @property {module:ol/View~View} [view] Custom view for the overview map. If not provided,
|
||||
* @property {module:ol/View} [view] Custom view for the overview map. If not provided,
|
||||
* a default view with an EPSG:3857 projection will be used.
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ const MIN_RATIO = 0.1;
|
||||
* Create a new control with a map acting as an overview map for an other
|
||||
* defined map.
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/OverviewMap~Options=} opt_options OverviewMap options.
|
||||
* @api
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ const OverviewMap = function(opt_options) {
|
||||
this.ovmapDiv_.className = 'ol-overviewmap-map';
|
||||
|
||||
/**
|
||||
* @type {module:ol/Map~Map}
|
||||
* @type {module:ol/Map}
|
||||
* @private
|
||||
*/
|
||||
this.ovmap_ = new Map({
|
||||
@@ -149,7 +149,7 @@ const OverviewMap = function(opt_options) {
|
||||
if (options.layers) {
|
||||
options.layers.forEach(
|
||||
/**
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer} layer Layer.
|
||||
*/
|
||||
function(layer) {
|
||||
ovmap.addLayer(layer);
|
||||
@@ -161,7 +161,7 @@ const OverviewMap = function(opt_options) {
|
||||
box.style.boxSizing = 'border-box';
|
||||
|
||||
/**
|
||||
* @type {module:ol/Overlay~Overlay}
|
||||
* @type {module:ol/Overlay}
|
||||
* @private
|
||||
*/
|
||||
this.boxOverlay_ = new Overlay({
|
||||
@@ -275,7 +275,7 @@ OverviewMap.prototype.setMap = function(map) {
|
||||
*/
|
||||
OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
||||
if (event.key === MapProperty.VIEW) {
|
||||
const oldView = /** @type {module:ol/View~View} */ (event.oldValue);
|
||||
const oldView = /** @type {module:ol/View} */ (event.oldValue);
|
||||
if (oldView) {
|
||||
this.unbindView_(oldView);
|
||||
}
|
||||
@@ -287,7 +287,7 @@ OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
||||
|
||||
/**
|
||||
* Register listeners for view property changes.
|
||||
* @param {module:ol/View~View} view The view.
|
||||
* @param {module:ol/View} view The view.
|
||||
* @private
|
||||
*/
|
||||
OverviewMap.prototype.bindView_ = function(view) {
|
||||
@@ -299,7 +299,7 @@ OverviewMap.prototype.bindView_ = function(view) {
|
||||
|
||||
/**
|
||||
* Unregister listeners for view property changes.
|
||||
* @param {module:ol/View~View} view The view.
|
||||
* @param {module:ol/View} view The view.
|
||||
* @private
|
||||
*/
|
||||
OverviewMap.prototype.unbindView_ = function(view) {
|
||||
@@ -322,8 +322,8 @@ OverviewMap.prototype.handleRotationChanged_ = function() {
|
||||
|
||||
/**
|
||||
* Update the overview map element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/OverviewMap~OverviewMap}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/OverviewMap}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
@@ -588,7 +588,7 @@ OverviewMap.prototype.getCollapsed = function() {
|
||||
|
||||
/**
|
||||
* Return the overview map.
|
||||
* @return {module:ol/PluggableMap~PluggableMap} Overview map.
|
||||
* @return {module:ol/PluggableMap} Overview map.
|
||||
* @api
|
||||
*/
|
||||
OverviewMap.prototype.getOverviewMap = function() {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {inherits} from '../index.js';
|
||||
* @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.
|
||||
* @property {number} [duration=250] Animation duration in milliseconds.
|
||||
* @property {boolean} [autoHide=true] Hide the control when rotation is 0.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control should
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when the control should
|
||||
* be re-rendered. This is called in a `requestAnimationFrame` callback.
|
||||
* @property {function()} [resetNorth] Function called when the control is clicked.
|
||||
* This will override the default `resetNorth`.
|
||||
@@ -34,7 +34,7 @@ import {inherits} from '../index.js';
|
||||
* selector is added to the button when the rotation is 0.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/Rotate~Options=} opt_options Rotate options.
|
||||
* @api
|
||||
*/
|
||||
@@ -153,8 +153,8 @@ Rotate.prototype.resetNorth_ = function() {
|
||||
|
||||
/**
|
||||
* Update the rotate control element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/Rotate~Rotate}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/Rotate}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
|
||||
@@ -41,7 +41,7 @@ const LEADING_DIGITS = [1, 2, 5];
|
||||
* @typedef {Object} Options
|
||||
* @property {string} [className='ol-scale-line'] CSS Class name.
|
||||
* @property {number} [minWidth=64] Minimum width in pixels.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when the control
|
||||
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
|
||||
* @property {Element|string} [target] Specify a target if you want the control
|
||||
* to be rendered outside of the map's viewport.
|
||||
@@ -60,7 +60,7 @@ const LEADING_DIGITS = [1, 2, 5];
|
||||
* but this can be changed by using the css selector `.ol-scale-line`.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/ScaleLine~Options=} opt_options Scale line options.
|
||||
* @api
|
||||
*/
|
||||
@@ -141,14 +141,16 @@ inherits(ScaleLine, Control);
|
||||
* @api
|
||||
*/
|
||||
ScaleLine.prototype.getUnits = function() {
|
||||
return /** @type {module:ol/control/ScaleLine~Units|undefined} */ (this.get(UNITS_PROP));
|
||||
return (
|
||||
/** @type {module:ol/control/ScaleLine~Units|undefined} */ (this.get(UNITS_PROP))
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Update the scale line element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/ScaleLine~ScaleLine}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/ScaleLine}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
|
||||
@@ -32,7 +32,7 @@ import {easeOut} from '../easing.js';
|
||||
* use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/Zoom~Options=} opt_options Zoom options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ const Direction = {
|
||||
* @typedef {Object} Options
|
||||
* @property {string} [className='ol-zoomslider'] CSS class name.
|
||||
* @property {number} [duration=200] Animation duration in milliseconds.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
||||
* @property {function(module:ol/MapEvent)} [render] Function called when the control
|
||||
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
|
||||
*/
|
||||
|
||||
@@ -43,7 +43,7 @@ const Direction = {
|
||||
* map.addControl(new ZoomSlider());
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/ZoomSlider~Options=} opt_options Zoom slider options.
|
||||
* @api
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ const ZoomSlider = function(opt_options) {
|
||||
containerElement.className = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;
|
||||
containerElement.appendChild(thumbElement);
|
||||
/**
|
||||
* @type {module:ol/pointer/PointerEventHandler~PointerEventHandler}
|
||||
* @type {module:ol/pointer/PointerEventHandler}
|
||||
* @private
|
||||
*/
|
||||
this.dragger_ = new PointerEventHandler(containerElement);
|
||||
@@ -207,8 +207,8 @@ ZoomSlider.prototype.initSlider_ = function() {
|
||||
|
||||
/**
|
||||
* Update the zoomslider element.
|
||||
* @param {module:ol/MapEvent~MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/ZoomSlider~ZoomSlider}
|
||||
* @param {module:ol/MapEvent} mapEvent Map event.
|
||||
* @this {module:ol/control/ZoomSlider}
|
||||
* @api
|
||||
*/
|
||||
export function render(mapEvent) {
|
||||
@@ -249,7 +249,7 @@ ZoomSlider.prototype.handleContainerClick_ = function(event) {
|
||||
|
||||
/**
|
||||
* Handle dragger start events.
|
||||
* @param {module:ol/pointer/PointerEvent~PointerEvent} event The drag event.
|
||||
* @param {module:ol/pointer/PointerEvent} event The drag event.
|
||||
* @private
|
||||
*/
|
||||
ZoomSlider.prototype.handleDraggerStart_ = function(event) {
|
||||
@@ -265,7 +265,7 @@ ZoomSlider.prototype.handleDraggerStart_ = function(event) {
|
||||
/**
|
||||
* Handle dragger drag events.
|
||||
*
|
||||
* @param {module:ol/pointer/PointerEvent~PointerEvent|Event} event The drag event.
|
||||
* @param {module:ol/pointer/PointerEvent|Event} event The drag event.
|
||||
* @private
|
||||
*/
|
||||
ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
|
||||
@@ -285,7 +285,7 @@ ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
|
||||
|
||||
/**
|
||||
* Handle dragger end events.
|
||||
* @param {module:ol/pointer/PointerEvent~PointerEvent|Event} event The drag event.
|
||||
* @param {module:ol/pointer/PointerEvent|Event} event The drag event.
|
||||
* @private
|
||||
*/
|
||||
ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
|
||||
|
||||
@@ -27,7 +27,7 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
|
||||
* extent. To style this control use the css selector `.ol-zoom-extent`.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/control/Control~Control}
|
||||
* @extends {module:ol/control/Control}
|
||||
* @param {module:ol/control/ZoomToExtent~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user