Index: dojo-release-1.3.2-src/dijit/Tree.js =================================================================== --- dojo-release-1.3.2-src.orig/dijit/Tree.js 2010-03-15 02:14:33.000000000 -0700 +++ dojo-release-1.3.2-src/dijit/Tree.js 2010-03-15 02:14:43.000000000 -0700 @@ -85,8 +85,8 @@ this.indent = indent; // Math.max() is to prevent negative padding on hidden root node (when indent == -1) - // 19 is the width of the expandoIcon (TODO: get this from CSS instead of hardcoding) - var pixels = (Math.max(indent, 0) * 19) + "px"; + // 19 (this.indentation) is the width of the expandoIcon (TODO: get this from CSS instead of hardcoding) + var pixels = ((Math.max(indent, 0) * this.indentation) + this.paddingLeft) + "px"; dojo.style(this.domNode, "backgroundPosition", pixels + " 0px"); dojo.style(this.rowNode, dojo._isBodyLtr() ? "paddingLeft" : "paddingRight", pixels); @@ -244,6 +244,8 @@ // indent: Integer // Levels from this node to the root node indent: 0, + indentation: 19, + paddingLeft: 0, setChildItems: function(/* Object[] */ items){ // summary: @@ -277,6 +279,8 @@ this.tree._createTreeNode({ item: item, tree: tree, + indentation: this.indentation, + paddingLeft: this.paddingLeft, isExpandable: model.mayHaveChildren(item), isSelectable: tree.getSelectable(item), isEditable: tree.getEditable(item), @@ -489,6 +493,9 @@ // One ore more attributes that holds children of a tree node childrenAttr: ["children"], + indentation: 19, // Number of pixels to indent the nodes at each level + paddingLeft: 0, // Amount of additional padding + // openOnClick: Boolean // If true, clicking a folder node's label will open it, rather than calling onClick() openOnClick: false, @@ -690,6 +697,8 @@ var rn = this.rootNode = this.tree._createTreeNode({ item: item, tree: this, + indentation: this.indentation, + paddingLeft: this.paddingLeft, isExpandable: true, isSelectable: this.getSelectable(item), isEditable: this.getEditable(item),