]> git.openstreetmap.org Git - rails.git/commitdiff
Reduce flicker in data browser
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 16 Oct 2012 00:23:11 +0000 (17:23 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Fri, 9 Nov 2012 20:59:28 +0000 (12:59 -0800)
app/assets/javascripts/index/browse.js

index e151a2dc3425027addab144ddbce83eed09753c6..65ed5f785301208f7865f6842d8b44aeb4a44814 100644 (file)
@@ -154,10 +154,6 @@ $(document).ready(function () {
 
       setStatus(I18n.t('browse.start_rjs.loading'));
 
-      $("#browse_content").empty();
-      dataLayer.clearLayers();
-      selectedLayer = null;
-
       var url = "/api/" + OSM.API_VERSION + "/map?bbox=" + browseBounds.toBBOX();
 
       /*
@@ -180,6 +176,10 @@ $(document).ready(function () {
         success: function (xml) {
           clearStatus();
 
+          $("#browse_content").empty();
+          dataLayer.clearLayers();
+          selectedLayer = null;
+
           dataLayer.addData(xml);
 
           layersById = {};