From c7e799ebf488cd51128946f90aeaa3047878944e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 23 Jun 2012 21:20:15 +0200 Subject: [PATCH] [ol.popup] make the API tests pass in advanced mode --- src/api/popup.js | 8 ++++++++ src/ol.export.js | 9 +++++++++ src/ol/Popup.js | 3 +-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/api/popup.js b/src/api/popup.js index 703f48a07e..d0fbf44259 100644 --- a/src/api/popup.js +++ b/src/api/popup.js @@ -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); +}; diff --git a/src/ol.export.js b/src/ol.export.js index 1900aee7b9..86d1b75727 100644 --- a/src/ol.export.js +++ b/src/ol.export.js @@ -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. diff --git a/src/ol/Popup.js b/src/ol/Popup.js index 112a93d8af..8ec7018aee 100644 --- a/src/ol/Popup.js +++ b/src/ol/Popup.js @@ -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); }