Export and externalize Control.setMap

This commit is contained in:
Éric Lemoine
2013-03-28 11:21:10 +01:00
parent 2944b31c69
commit 7a71f107cb
10 changed files with 40 additions and 13 deletions

View File

@@ -109,6 +109,13 @@
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.ControlOptions
* @property {Element|undefined} element Element.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.DefaultsOptions
* @property {boolean|undefined} attribution Attribution.

View File

@@ -0,0 +1,2 @@
@exportClass ol.control.Control ol.control.ControlOptions
@exportProperty ol.control.Control.prototype.setMap

View File

@@ -1,5 +1,4 @@
goog.provide('ol.control.Control');
goog.provide('ol.control.ControlOptions');
goog.require('goog.Disposable');
goog.require('goog.array');
@@ -8,14 +7,6 @@ goog.require('goog.events');
goog.require('ol.MapEventType');
/**
* @typedef {{element: (Element|undefined),
* map: (ol.Map|undefined),
* target: (Element|undefined)}}
*/
ol.control.ControlOptions;
/**
* A thing which is painted over the map to provide a means for interaction
@@ -23,6 +14,7 @@ ol.control.ControlOptions;
*
* @constructor
* @extends {goog.Disposable}
* @implements {oli.control.Control}
* @param {ol.control.ControlOptions} options Control options.
*/
ol.control.Control = function(options) {
@@ -85,10 +77,9 @@ ol.control.Control.prototype.handleMapPostrender = goog.nullFunction;
/**
* Removes the control from its current map and attaches it to the new map.
* Subtypes might also wish set up event handlers to get notified about changes
* to the map here.
*
* 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 {ol.Map} map Map.
*/
ol.control.Control.prototype.setMap = function(map) {