Move FullScreenOptions to ol/control/FullScreen

This commit is contained in:
Tim Schaub
2018-03-11 10:46:56 -06:00
parent 9468fd45ec
commit 5dcfa1137d
3 changed files with 22 additions and 87 deletions

View File

@@ -12,76 +12,6 @@ let olx;
olx.control;
/**
* @typedef {{className: (string|undefined),
* label: (string|Element|undefined),
* labelActive: (string|Element|undefined),
* tipLabel: (string|undefined),
* keys: (boolean|undefined),
* target: (Element|string|undefined),
* source: (Element|string|undefined)}}
*/
olx.control.FullScreenOptions;
/**
* CSS class name. Default is `ol-full-screen`.
* @type {string|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.className;
/**
* Text label to use for the button. Default is `\u2922` (NORTH EAST AND SOUTH WEST ARROW).
* Instead of text, also an element (e.g. a `span` element) can be used.
* @type {string|Element|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.label;
/**
* Text label to use for the button when full-screen is active.
* Default is `\u00d7` (a cross).
* Instead of text, also an element (e.g. a `span` element) can be used.
* @type {string|Element|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.labelActive;
/**
* Text label to use for the button tip. Default is `Toggle full-screen`
* @type {string|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.tipLabel;
/**
* Full keyboard access.
* @type {boolean|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.keys;
/**
* Specify a target if you want the control to be rendered outside of the map's
* viewport.
* @type {Element|string|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.target;
/**
* The element to be displayed fullscreen. When not provided, the element containing the map viewport will be displayed fullscreen.
* @type {Element|string|undefined}
* @api
*/
olx.control.FullScreenOptions.prototype.source;
/**
* @typedef {{className: (string|undefined),
* coordinateFormat: (module:ol/coordinate~CoordinateFormat|undefined),

View File

@@ -1,20 +1,4 @@
/**
* @typedef {Object} control_FullScreenOptions
* @property {string|undefined} className CSS class name. Default is `ol-full-screen`.
* @property {string|Element|undefined} label Text label to use for the button. Default is `\u2922` (NORTH EAST AND SOUTH WEST ARROW).
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|Element|undefined} labelActive Text label to use for the button when full-screen is active.
* Default is `\u00d7` (a cross).
* 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 `Toggle full-screen`
* @property {boolean|undefined} keys Full keyboard access.
* @property {Element|string|undefined} target Specify a target if you want the control to be rendered outside of the map's
* viewport.
* @property {Element|string|undefined} source The element to be displayed fullscreen. When not provided, the element containing the map viewport will be displayed fullscreen.
*/
/**
* @typedef {Object} control_MousePositionOptions
* @property {string|undefined} className CSS class name. Default is `ol-mouse-position`.

View File

@@ -32,6 +32,27 @@ const getChangeType = (function() {
})();
/**
* @typedef {Object} Options
* @property {string|undefined} className CSS class name. Default is
* `'ol-full-screen'`.
* @property {string|Element|undefined} label Text label to use for the button.
* Default is `'\u2922'` (NORTH EAST AND SOUTH WEST ARROW).
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|Element|undefined} labelActive Text label to use for the
* button when full-screen is active. Default is `'\u00d7'` (a cross).
* 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 `'Toggle full-screen'`.
* @property {boolean|undefined} keys Full keyboard access.
* @property {Element|string|undefined} target Specify a target if you want the
* control to be rendered outside of the map's viewport.
* @property {Element|string|undefined} source The element to be displayed
* fullscreen. When not provided, the element containing the map viewport will
* be displayed fullscreen.
*/
/**
* @classdesc
* Provides a button that when clicked fills up the full screen with the map.
@@ -46,7 +67,7 @@ const getChangeType = (function() {
*
* @constructor
* @extends {ol.control.Control}
* @param {olx.control.FullScreenOptions=} opt_options Options.
* @param {module:ol/control/FullScreen~Options=} opt_options Options.
* @api
*/
const FullScreen = function(opt_options) {