From 4289afa6fe0645336d4aedb1b0e4d59cb3b5ce2f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 15:47:20 -0400 Subject: [PATCH] Keep Mapillary viewer loading animation if canvas not yet created --- js/id/services/mapillary.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/id/services/mapillary.js b/js/id/services/mapillary.js index 1506c385c..960714b59 100644 --- a/js/id/services/mapillary.js +++ b/js/id/services/mapillary.js @@ -310,6 +310,11 @@ iD.services.mapillary = function() { }; mapillary.setViewerLoading = function(loading) { + var canvas = d3.select('#content') + .selectAll('.mly-wrapper canvas'); + + if (canvas.empty()) return; // viewer not loaded yet + var cover = d3.select('#content') .selectAll('.mly-wrapper .Cover');