wesnolte / jOrgChart

A jQuery plugin to draw tree-like structures such as OrgCharts.
992 stars 674 forks source link

Improvement in layout, IE7 fix, and collapsed sub-trees #2

Closed neilb closed 12 years ago

neilb commented 12 years ago

Hi Wes,

Thanks for your OrgChart plugin. I was working on something very similar, but you're further along than me! I've made three changes:

[1]

Side padding for nodes meant that with deep trees, as you expanded/closed sub-trees, things would move a little. This also meant that on some older browsers the lines wouldn't align with nodes. Now renders cleanly on IE 7/8/9, Chrome, Firefox, Safari, Opera and Camino.

[2]

On IE7 the horizontal lines weren't showing up. The fix was just to put an   inside the relevant TD elements.

[3]

Added the ability to start off with parts of the tree collapsed. Just add class=collapsed to the relevant LI element.

cheers, Neil

wesnolte commented 12 years ago

Great work Neil :) A few small tweaks have added a lot of value. Someone just poked me about the IE7 thing an hour ago!