Skip to content

Commit

Permalink
Fix logic for setting tree children height so it works when hidden, f…
Browse files Browse the repository at this point in the history
…ixes SitePen#140
  • Loading branch information
kriszyp committed May 29, 2012
1 parent 4b55763 commit 7ca0963
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tree.js
Expand Up @@ -93,7 +93,8 @@ return function(column){
}) : }) :
grid.renderArray(query({}), preloadNode), grid.renderArray(query({}), preloadNode),
function(){ function(){
container.style.height = container.scrollHeight + "px"; var scrollHeight = container.scrollHeight;
container.style.height = scrollHeight ? scrollHeight + "px" : "auto";
}); });
var transitionend = function(event){ var transitionend = function(event){
var height = this.style.height; var height = this.style.height;
Expand Down

0 comments on commit 7ca0963

Please sign in to comment.