[Commits] r2463 - core/trunk/geoext/lib/GeoExt/widgets/tree
commits at geoext.org
commits at geoext.org
Wed Oct 13 13:18:08 CEST 2010
Author: fredj
Date: 2010-10-13 13:18:08 +0200 (Wed, 13 Oct 2010)
New Revision: 2463
Modified:
core/trunk/geoext/lib/GeoExt/widgets/tree/BaseLayerContainer.js
core/trunk/geoext/lib/GeoExt/widgets/tree/LayerContainer.js
core/trunk/geoext/lib/GeoExt/widgets/tree/OverlayLayerContainer.js
Log:
move 'text' definition outside of the constructor. r=elemoine (closes #353)
Modified: core/trunk/geoext/lib/GeoExt/widgets/tree/BaseLayerContainer.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/tree/BaseLayerContainer.js 2010-10-11 20:18:02 UTC (rev 2462)
+++ core/trunk/geoext/lib/GeoExt/widgets/tree/BaseLayerContainer.js 2010-10-13 11:18:08 UTC (rev 2463)
@@ -25,7 +25,9 @@
*
* A layer container that will collect all base layers of an OpenLayers
* map. Only layers that have displayInLayerSwitcher set to true will be
- * included. The childrens' iconCls defaults to "gx-tree-baselayer-icon".
+ * included. The childrens' iconCls defaults to
+ * "gx-tree-baselayer-icon" and this node' text defaults to
+ * "Base Layer".
*
* Children will be rendered with a radio button instead of a checkbox,
* showing the user that only one base layer can be active at a time.
@@ -35,12 +37,17 @@
*/
GeoExt.tree.BaseLayerContainer = Ext.extend(GeoExt.tree.LayerContainer, {
+ /** private: property[text]
+ * ``String`` The text for this node.
+ */
+ text: 'Base Layer',
+
/** private: method[constructor]
* Private constructor override.
*/
constructor: function(config) {
config = Ext.applyIf(config || {}, {
- text: "Base Layer",
+ text: this.text,
loader: {}
});
config.loader = Ext.applyIf(config.loader, {
Modified: core/trunk/geoext/lib/GeoExt/widgets/tree/LayerContainer.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/tree/LayerContainer.js 2010-10-11 20:18:02 UTC (rev 2462)
+++ core/trunk/geoext/lib/GeoExt/widgets/tree/LayerContainer.js 2010-10-13 11:18:08 UTC (rev 2463)
@@ -23,7 +23,7 @@
* A subclass of ``Ext.tree.AsyncTreeNode`` that will collect all layers of an
* OpenLayers map. Only layers that have displayInLayerSwitcher set to true
* will be included. The childrens' iconCls defaults to
- * "gx-tree-layer-icon".
+ * "gx-tree-layer-icon" and this node' text defaults to "Layers".
*
* Note: if this container is loaded by an ``Ext.tree.TreeLoader``, the
* ``applyLoader`` config option of that loader needs to be set to
@@ -49,13 +49,18 @@
* ``Object``, this property will be set as the store option of the
* loader. Otherwise it will be ignored.
*/
+
+ /** private: property[text]
+ * ``String`` The text for this node.
+ */
+ text: 'Layers',
/** private: method[constructor]
* Private constructor override.
*/
constructor: function(config) {
config = Ext.applyIf(config || {}, {
- text: "Layers"
+ text: this.text
});
this.loader = config.loader instanceof GeoExt.tree.LayerLoader ?
config.loader :
Modified: core/trunk/geoext/lib/GeoExt/widgets/tree/OverlayLayerContainer.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/tree/OverlayLayerContainer.js 2010-10-11 20:18:02 UTC (rev 2462)
+++ core/trunk/geoext/lib/GeoExt/widgets/tree/OverlayLayerContainer.js 2010-10-13 11:18:08 UTC (rev 2463)
@@ -25,19 +25,25 @@
*
* A layer container that will collect all overlay layers of an OpenLayers
* map. Only layers that have displayInLayerSwitcher set to true will be
- * included.
+ * included. The childrens' iconCls defaults to
+ * "gx-tree-layer-icon" and this node' text defaults to "Overlays".
*
* To use this node type in ``TreePanel`` config, set nodeType to
* "gx_overlaylayercontainer".
*/
GeoExt.tree.OverlayLayerContainer = Ext.extend(GeoExt.tree.LayerContainer, {
+ /** private: property[text]
+ * ``String`` The text for this node.
+ */
+ text: 'Overlays',
+
/** private: method[constructor]
* Private constructor override.
*/
constructor: function(config) {
config = Ext.applyIf(config || {}, {
- text: "Overlays"
+ text: this.text
});
config.loader = Ext.applyIf(config.loader || {}, {
filter: function(record){
More information about the Commits
mailing list