[ol.popup] make the API tests pass in advanced mode

This commit is contained in:
Éric Lemoine
2012-06-23 21:20:15 +02:00
parent 08d6e35252
commit c7e799ebf4
3 changed files with 18 additions and 2 deletions

View File

@@ -128,3 +128,11 @@ ol.Popup.prototype.template = function(opt_arg){
}
};
/**
* Open the popup.
* @export
* @param {ol.Feature|ol.Loc} opt_arg feature or location for the anchor
*/
ol.Popup.prototype.open = function(opt_arg) {
this.doOpen(opt_arg);
};

View File

@@ -97,6 +97,15 @@ goog.exportProperty(ol.geom.MultiPoint.prototype, 'addAll', ol.geom.MultiPoint.p
goog.exportProperty(ol.geom.MultiPoint.prototype, 'remove', ol.geom.MultiPoint.prototype.remove);
goog.exportProperty(ol.geom.MultiPoint.prototype, 'centroid', ol.geom.MultiPoint.prototype.centroid);
// ol.popup
goog.exportSymbol('ol.popup', ol.popup);
goog.exportSymbol('ol.Popup', ol.Popup);
goog.exportProperty(ol.Popup.prototype, 'anchor', ol.Popup.prototype.anchor);
goog.exportProperty(ol.Popup.prototype, 'map', ol.Popup.prototype.map);
goog.exportProperty(ol.Popup.prototype, 'content', ol.Popup.prototype.content);
goog.exportProperty(ol.Popup.prototype, 'template', ol.Popup.prototype.template);
goog.exportProperty(ol.Popup.prototype, 'open', ol.Popup.prototype.open);
/**
* Lookup for dynamically registered controls and renderers does not work in
* advanced compiled mode. For now, we duplicate the registration calls here.

View File

@@ -184,10 +184,9 @@ ol.Popup.prototype.setTemplate = function(template) {
/**
* Open the popup.
* @export
* @param {ol.Feature|ol.Loc} opt_arg feature or location for the anchor
*/
ol.Popup.prototype.open = function(opt_arg) {
ol.Popup.prototype.doOpen = function(opt_arg) {
if (goog.isDef(opt_arg)) {
this.setAnchor(opt_arg);
}