diff options
Diffstat (limited to 'module/web/static/js/views/packageView.js')
-rw-r--r-- | module/web/static/js/views/packageView.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/web/static/js/views/packageView.js b/module/web/static/js/views/packageView.js index 365f3a69f..5d8aa7738 100644 --- a/module/web/static/js/views/packageView.js +++ b/module/web/static/js/views/packageView.js @@ -53,13 +53,12 @@ define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView'], ul.append(new fileView({model: file}).render().el); }); - this.$el.append(ul); - // TODO: additionally it could be placed out of viewport first // The real height can only be retrieved when element is on DOM and display:true ul.css('visibility', 'hidden'); + this.$el.append(ul); + var height = ul.height(); - ul.css('visibility', ''); // Hide the element when not expanded if (!this.expanded) { @@ -67,6 +66,7 @@ define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView'], ul.height(0); } + ul.css('visibility', ''); ul.data('height', height); console.log(ul.data("height")); |