Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#9078 closed defect (fixed)

Tree: hardcoded 19px padding breaking my site's layout

Reported by: Scott Moxham Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: padding tree Cc:
Blocked By: Blocking:


v1.3.0 has added some inline paddingLeft of 19px into the dijit.tree nodes for indentation. This was not in 1.2.3 and it breaks the layout of my site.

This indent really needs to be in CSS instead of inline so that it can be easily overridden.

Change History (6)

comment:1 Changed 13 years ago by bill

Milestone: tbd1.4
Owner: set to bill
Summary: Newly introduced inline padding in dijit.tree breaking my site's layoutTree: hardcoded 19px padding breaking my site's layout

Yup, I agree, I added a comment for this in [16088] but forgot to file a ticket for it (or fix it). Thanks for the reminder.

comment:2 Changed 13 years ago by travis.haagen

Can someone please describe how to fix this manually. For some reason, I have had difficulty finding where the 19px indentation is hard-coded. Thanks.

comment:3 Changed 13 years ago by bill

I'm going to work on this soon but to change it manually just search for the string "19" in Tree.js.

comment:4 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

(In [17543]) Make indent for Tree's nodes adjustable via CSS.

Since dojo.marginBox() doesn't work reliably until the Tree's DOM node is inserted into the document and is visible, the CSS width is read when Tree.resize() is called. If Tree.resize() isn't called then it defaults to 19px, as before (for backwards compatibility).

Fixes #9078 !strict.

comment:5 Changed 13 years ago by Nathan Toone

(In [17554]) Refs #9078 - when resizing a tree that does not show root, the whole tree gets indented. Honor the showRoot instead !strict

comment:6 Changed 10 years ago by bill

In [28846]:

If the Tree is hidden during initial resize for some reason, then use default 19px indent rather than 0px indent.

Refs #9078 !strict.

Note: See TracTickets for help on using tickets.