From 2227dc8686ef720dca9a6e6eeb9dbd25dab85404 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Fri, 5 Mar 2010 01:51:01 +0000 Subject: [PATCH] Delay injecting facet body into the DOM to speed things up a little. git-svn-id: http://google-refine.googlecode.com/svn/trunk@205 7d457c2a-affb-35e4-300a-418c747d4874 --- src/main/webapp/scripts/facets/list-facet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/scripts/facets/list-facet.js b/src/main/webapp/scripts/facets/list-facet.js index 7b7abb763..7545b0e93 100644 --- a/src/main/webapp/scripts/facets/list-facet.js +++ b/src/main/webapp/scripts/facets/list-facet.js @@ -109,12 +109,13 @@ ListFacet.prototype.render = function() { self._remove(); }).prependTo(headerDiv); - var bodyDiv = $('
').addClass("facet-body").appendTo(container); + var bodyDiv = $('
').addClass("facet-body"); if (!("scroll" in this._options) || this._options.scroll) { bodyDiv.addClass("facet-body-scrollable"); } if (this._data == null) { + bodyDiv.appendTo(container); bodyDiv.html("Loading..."); } else { var selectionCount = this._selection.length @@ -185,6 +186,7 @@ ListFacet.prototype.render = function() { renderChoice(this._errorChoice, "(error)"); } + bodyDiv.appendTo(container); bodyDiv[0].scrollTop = scrollTop; var footerDiv = $('
').addClass("facet-footer").appendTo(container);