[Commits] r230 - sandbox/opengeo/drake/trunk/core/lib/GeoExt/widgets/popup
commits at geoext.org
commits at geoext.org
Wed Mar 18 18:53:35 CET 2009
Author: dwins
Date: 2009-03-18 18:53:34 +0100 (Wed, 18 Mar 2009)
New Revision: 230
Modified:
sandbox/opengeo/drake/trunk/core/lib/GeoExt/widgets/popup/Popup.js
Log:
Allow anchoring popups to arbitrary lon/lat positions by passing in an OpenLayers.LonLat to the constructor.
Modified: sandbox/opengeo/drake/trunk/core/lib/GeoExt/widgets/popup/Popup.js
===================================================================
--- sandbox/opengeo/drake/trunk/core/lib/GeoExt/widgets/popup/Popup.js 2009-03-18 17:47:08 UTC (rev 229)
+++ sandbox/opengeo/drake/trunk/core/lib/GeoExt/widgets/popup/Popup.js 2009-03-18 17:53:34 UTC (rev 230)
@@ -60,6 +60,12 @@
//private
initComponent: function(){
+ if (!this.feature && this.lonlat){
+ this.feature = new OpenLayers.Feature.Vector(
+ new OpenLayers.Geometry.Point(this.lonlat.lon, this.lonlat.lat)
+ );
+ }
+
this.baseCls = this.popupCls + " " + this.baseCls;
this.elements += ',anc';
@@ -324,4 +330,4 @@
});
-Ext.reg('gx_popup', GeoExt.popup.Popup);
\ No newline at end of file
+Ext.reg('gx_popup', GeoExt.popup.Popup);
More information about the Commits
mailing list