Use common method for tree layout.