[Commits] r1881 - core/trunk/geoext/lib/GeoExt/widgets
commits at geoext.org
commits at geoext.org
Thu Feb 11 14:45:25 CET 2010
Author: ahocevar
Date: 2010-02-11 14:45:25 +0100 (Thu, 11 Feb 2010)
New Revision: 1881
Modified:
core/trunk/geoext/lib/GeoExt/widgets/UrlLegend.js
core/trunk/geoext/lib/GeoExt/widgets/WMSLegend.js
Log:
Add legend subitems on item creation, not when the items are rendered. r=bartvde (closes #219)
Modified: core/trunk/geoext/lib/GeoExt/widgets/UrlLegend.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/UrlLegend.js 2010-02-11 07:31:23 UTC (rev 1880)
+++ core/trunk/geoext/lib/GeoExt/widgets/UrlLegend.js 2010-02-11 13:45:25 UTC (rev 1881)
@@ -35,19 +35,11 @@
*/
initComponent: function() {
GeoExt.UrlLegend.superclass.initComponent.call(this);
- },
-
- /** private: method[onRender]
- * Private method called when the legend image component is being
- * rendered.
- */
- onRender: function(ct, position) {
- GeoExt.UrlLegend.superclass.onRender.call(this, ct, position);
this.add(new GeoExt.LegendImage({
url: this.layerRecord.get("legendURL")
}));
},
-
+
/** private: method[update]
* Private override
*/
@@ -69,4 +61,4 @@
GeoExt.LayerLegend.types["gx_urllegend"] = GeoExt.UrlLegend;
/** api: xtype = gx_urllegend */
-Ext.reg('gx_urllegend', GeoExt.UrlLegend);
\ No newline at end of file
+Ext.reg('gx_urllegend', GeoExt.UrlLegend);
Modified: core/trunk/geoext/lib/GeoExt/widgets/WMSLegend.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/WMSLegend.js 2010-02-11 07:31:23 UTC (rev 1880)
+++ core/trunk/geoext/lib/GeoExt/widgets/WMSLegend.js 2010-02-11 13:45:25 UTC (rev 1881)
@@ -53,17 +53,9 @@
*/
initComponent: function() {
GeoExt.WMSLegend.superclass.initComponent.call(this);
- },
-
- /** private: method[onRender]
- * Private method called when the legend image component is being
- * rendered.
- */
- onRender: function(ct, position) {
- GeoExt.WMSLegend.superclass.onRender.call(this, ct, position);
this.update();
},
-
+
/** private: method[getLegendUrl]
* :param layerName: ``String`` A sublayer.
* :param layerNames: ``Array(String)`` The array of sublayers,
More information about the Commits
mailing list