Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

wv-1278 hack for svg rendering not working properly in firefox

Taylor Gunnoe40f1a1aa670a
diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.js
index d70917121..15d6361e2 100644
--- a/web/js/date/wv.date.timeline.js
+++ b/web/js/date/wv.date.timeline.js
@@ -299,6 +299,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
setZoom(zoomLvl);
}
+ self.setClip();
};
var getSubLabel = function(tickDate){
@@ -1954,8 +1955,17 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
self.collapse(true);
};
+ self.setClip = function(){ //This is a hack until Firefox fixes their svg rendering problems
+ d3.select('#timeline-footer svg > g:nth-child(2)').attr('visibility', 'hidden');
+ d3.select('#timeline-footer svg > g:nth-child(2)').attr('style','');
+ setTimeout(function(){
+ d3.select('#timeline-footer svg > g:nth-child(2)').attr('style','clip-path:url("#timeline-boundary")');
+ d3.select('#timeline-footer svg > g:nth-child(2)').attr('visibility', '');
+ console.log('clip reset successfully');
+ },50);
+ };
+
init();
$(window).resize(resizeWindow);
-
return self;
};