[Commits] r1317 - sandbox/elemoine/playground/geoext/lib/GeoExt/widgets/tree

commits at geoext.org commits at geoext.org
Mon Aug 10 06:27:42 CEST 2009


Author: elemoine
Date: 2009-08-10 06:27:42 +0200 (Mon, 10 Aug 2009)
New Revision: 1317

Modified:
   sandbox/elemoine/playground/geoext/lib/GeoExt/widgets/tree/LayerNode.js
Log:
some docs for the new "actions" and "component" properties


Modified: sandbox/elemoine/playground/geoext/lib/GeoExt/widgets/tree/LayerNode.js
===================================================================
--- sandbox/elemoine/playground/geoext/lib/GeoExt/widgets/tree/LayerNode.js	2009-08-10 04:27:00 UTC (rev 1316)
+++ sandbox/elemoine/playground/geoext/lib/GeoExt/widgets/tree/LayerNode.js	2009-08-10 04:27:42 UTC (rev 1317)
@@ -266,6 +266,40 @@
      *  will be run by this node in the context of this node, to create child nodes.
      */
     childNodeType: null,
+
+    /** api: config[actions]
+     *  ``Array(Object)`` An array of objects defining actions. An action is a
+     *  clickable image in the node, it is defined with two properties:
+     *  "action" and "qtip".
+     *  * the "action" property provides the name of the action. It is used as
+     *    the name of the ``img`` tag's class. The ``img`` tag being placed in a
+     *    div whose class is "gx-tree-layer-actions" a CSS selector for the
+     *    action is ``.gx-tree-layer-actions .action-name``. The name of the
+     *    action is also set in "action" events for "action" listeners to know
+     *    which action got clicked.
+     *  * the "qtip" property references the tooltip displayed when the action
+     *    image is hovered.
+     *  This property applies only if the node is configured with a
+     *  :class:`GeoExt.tree.LayerNodeUI` UI instance (which is the default).
+     */
+
+    /** api: config[component]
+     *  ``Ext.Component or Object or Function`` This property is to be used
+     *  when an Ext component is to be inserted in the node. This property can
+     *  be used in several ways, it can reference
+     *  * ``Ext.Component`` a component instance. In this case the provided
+     *    component is just rendered in the node.
+     *  * ``Object`` a component config (using ``xtype``). In this case the
+     *    component is instantiated and then rendered in the node.
+     *  * ``Function`` a function returning a component instance or config.
+     *    This function is passed a reference to the layer node and to the Ext
+     *    element (``Ext.Element``) into which the component is to be rendered,
+     *    it must returned a component instance or config.
+     *  * ``Object`` an object with a ``fn`` and ``scope`` properties. ``fn``
+     *    references a function returning a component instance or config (like
+     *    previously), ``scope`` is its execution scope.
+     *  This property applies only if the node is configured with a
+     *  :class:`GeoExt.tree.LayerNodeUI` UI instance (which is the default).
     
     /** private: method[constructor]
      *  Private constructor override.



More information about the Commits mailing list