Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-991 Fixed overflow issue with pick in older webkit versions

Taylor Gunnoea9573cbb86e9
diff --git a/web/css/new-ui.css b/web/css/new-ui.css
index baefbe612..6b1b6a1bc 100644
--- a/web/css/new-ui.css
+++ b/web/css/new-ui.css
@@ -269,6 +269,7 @@ display:inline-block;}
}
#timeline-footer svg {
overflow:visible;
+ margin-top:-16px;
}
#timeline-footer svg > g{
overflow:hidden;
diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.js
index 85f7c0e57..a694af6ed 100644
--- a/web/js/date/wv.date.timeline.js
+++ b/web/js/date/wv.date.timeline.js
@@ -231,7 +231,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
// if($('#guitarpick').is(':hidden')){
// }
- guitarPick.attr("transform","translate("+(x(model.selected)-25)+",-16)");
+ guitarPick.attr("transform","translate("+(x(model.selected)-25)+",0)");
gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];
};
@@ -724,7 +724,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
setData();
//UPDATE GUITARPICK
- guitarPick.attr("transform","translate("+(x(model.selected)-25)+",-16)");
+ guitarPick.attr("transform","translate("+(x(model.selected)-25)+",0)");
gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];
if ((gpLocation-30) >= (width-margin.left-margin.right)){
@@ -1163,7 +1163,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
//UPDATE GUITARPICK
if(guitarPick){
- guitarPick.attr("transform","translate("+(x(model.selected)-25)+",-16)");
+ guitarPick.attr("transform","translate("+(x(model.selected)-25)+",0)");
gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];
if ((gpLocation-30) >= (width-margin.left-margin.right)){
$('#guitarpick').hide();
@@ -1308,7 +1308,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
d3.select('#timeline-footer')
.append("svg:svg")
.attr('width', width)// + margin.left + margin.right)
- .attr('height', height + margin.top + margin.bottom)
+ .attr('height', height + margin.top + margin.bottom + 16)
.call(zoom)
.append("svg:defs")
.append("svg:clipPath")
@@ -1316,6 +1316,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
.append("svg:rect")
.attr('width', width)// + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom);
+// .attr('y',16);
d3.select("#timeline-footer svg defs")
.append("svg:clipPath")
@@ -1323,13 +1324,13 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
.append("svg:rect")
.attr('width', width+margin.left+margin.right)// + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
- .attr("y","-16")
.attr("x",-margin.left);
timeline = d3.select("#timeline-footer svg")
.append("svg:g")
.attr("clip-path","#timeline-boundary")
- .attr("style","clip-path:url(#timeline-boundary)");
+ .attr("style","clip-path:url(#timeline-boundary)")
+ .attr("transform","translate(0,16)");
timeline.append("svg:g")
.attr("class", "x axis")
@@ -1346,8 +1347,6 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
dataBars = timeline.insert("svg:g",'.x.axis')
- .attr("style","clip-path:url(#timeline-boundary)")
- .attr("clip-path","#timeline-boundary")
.attr("height",height)
.classed('plot',true);
@@ -1367,8 +1366,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
.append("svg:g")
.attr("id","guitarpick")
.attr("style","clip-path:url(#guitarpick-boundary);")
- .append("svg:g")
- .attr("transform","translate("+(x(model.selected)-28)+",-16)");
+ .attr("transform","translate("+(x(model.selected)-28)+",0)");
guitarPick.append("svg:path")
.attr("d", "M 7.3151,0.7426 C 3.5507,0.7426 0.5,3.7926 0.5,7.5553 l 0,21.2724 14.6038,15.7112 14.6039,15.7111 14.6038,-15.7111 14.6037,-15.7112 0,-21.2724 c 0,-3.7627 -3.051,-6.8127 -6.8151,-6.8127 l -44.785,0 z");
@@ -1424,7 +1422,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
}
if((newDate > dataLimits[0]) && (newDate < dataLimits[1])){
- guitarPick.attr("transform","translate("+ (x(newDate)-28) +",-16)");
+ guitarPick.attr("transform","translate("+ (x(newDate)-28) +",0)");
gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];
model.select(newDate);