Move ZoomToExtentOptions to ol/control/ZoomToExtent

This commit is contained in:
Tim Schaub
2018-03-11 11:34:09 -06:00
parent 4c7a07e4b8
commit 328910049d
3 changed files with 16 additions and 74 deletions

View File

@@ -7,6 +7,21 @@ import EventType from '../events/EventType.js';
import Control from '../control/Control.js';
import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
/**
* @typedef {Object} Options
* @property {string|undefined} className Class name. Default is `'ol-zoom-extent'`.
* @property {Element|string|undefined} target Specify a target if you want the control
* to be rendered outside of the map's viewport.
* @property {string|Element|undefined} label Text label to use for the button. Default
* is `'E'`. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|undefined} tipLabel Text label to use for the button tip. Default
* is `'Zoom to extent'`.
* @property {ol.Extent|undefined} extent The extent to zoom to. If undefined the validity
* extent of the view projection is used.
*/
/**
* @classdesc
* A button control which, when pressed, changes the map view to a specific
@@ -14,7 +29,7 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
*
* @constructor
* @extends {ol.control.Control}
* @param {olx.control.ZoomToExtentOptions=} opt_options Options.
* @param {module:ol/control/ZoomToExtent~Options=} opt_options Options.
* @api
*/
const ZoomToExtent = function(opt_options) {