Interactive interface for browsing global, full-resolution satellite imagery
WV-1119 Fixes for support of IE9
Taylor Gunnoe7da7ae376e41
diff --git a/web/css/new-ui.css b/web/css/new-ui.cssindex a89a52879..60fff552a 100644--- a/web/css/new-ui.css+++ b/web/css/new-ui.css@@ -11,8 +11,7 @@left:10px;right:10px;border:1px solid #333;- background: rgba(40,40,40,0.9); /* W3C */- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#c2c2c2',GradientType=0 ); /* IE6-9 */+ background: rgba(40,40,40,0.9);min-width:286px;border-radius:5px;}@@ -193,13 +192,7 @@ display:inline-block;}position:relative;}-#timeline-header .button-action-group svg {- position: absolute;- top: 50%;- margin-top: -15px;- left: 50%;- margin-left: -12px;-}+#timeline-header .button-action-group svg path{fill:#fff;}@@ -238,16 +231,25 @@ display:inline-block;}#timeline-header>.button-action-group:hover,#timeline-header .date-arrows:hover{background-color:#fff;cursor:pointer;- }+}#timeline-header>.button-action-group.button-disabled:hover{background-color:transparent;cursor:default;}-#left-arrow-group{+#timeline-header .button-action-group svg {+ position: absolute;+ top: 50%;+ margin-top: -15px;+ left: 50%;+ margin-left: -12px;+}+#timeline-header #left-arrow-group{-moz-transform: scaleX(-1);-o-transform: scaleX(-1);-webkit-transform: scaleX(-1);transform: scaleX(-1);+}+#timeline-header #left-arrow-group svg{filter: FlipH;-ms-filter: "FlipH";}@@ -355,7 +357,6 @@ display:inline-block;}#guitarpick{cursor:pointer;clip-path:url(#guitarpick-boundary);-}#guitarpick path{fill:#cccccc;diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.jsindex b4555e7a3..80985bd9c 100644--- a/web/js/date/wv.date.timeline.js+++ b/web/js/date/wv.date.timeline.js@@ -241,7 +241,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {changeDate = undefined;- gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];+ gpLocation = parseFloat(guitarPick.attr('transform').split('(')[1].split(',')[0]);};var moveToPick = function(){@@ -740,12 +740,11 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {.data([{x: x(model.selected)-30, y:0}]).call(drag);- gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];-+ gpLocation = parseFloat(guitarPick.attr('transform').split('(')[1].split(',')[0]);if ((gpLocation-30) >= (width-margin.left-margin.right)){$('#guitarpick').hide();}- else if((gpLocation) <= -30){+ else if(gpLocation <= -30){$('#guitarpick').hide();}else{@@ -1191,7 +1190,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {guitarPick.attr("transform","translate("+(x(model.selected)-30)+",0)");- gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];+ gpLocation = parseFloat(guitarPick.attr('transform').split('(')[1].split(',')[0]);if ((gpLocation-30) >= (width-margin.left-margin.right)){$('#guitarpick').hide();@@ -1266,7 +1265,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {var showHoverLabel = function(d){var tick = this.parentNode;var boundaryTick, boundaryTickWidth;- if(tick.classList.contains('tick-labeled')){ //TODO: Check comaptibility of classList.contains+ if(d3.select(tick).classed('tick-labeled')){$boundaryTick = $(tick);}else{@@ -1297,13 +1296,18 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {.classed('bg-hover',false); //untrigger hover state};-+ var dragForward;var dragmove = function(d){ //FIXME: still moves slightly to the right or left when changing directionsvar halfPickWidth = pickWidth/2;var pickOffset = Math.max(-halfPickWidth,Math.min(width-halfPickWidth,d3.event.x));var pickTipDate = x.invert(pickOffset+halfPickWidth);if(d3.event.dx > 0){//moving right+ if(dragForward===false)+ {+ dragforward = true;+ changeDate = undefined;+ }if((changeDate === undefined)){forwardChangeDate(pickTipDate);}@@ -1313,6 +1317,12 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {}}else if(d3.event.dx < 0){//moving left+ if(dragForward)+ {+ dragforward = false;+ changeDate = undefined;+ }+if((changeDate === undefined)){backwardChangeDate(pickTipDate);}@@ -1493,6 +1503,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {.origin(function(d) { return d; }).on("dragstart",function(){mousedown = true;+ changeDate = undefined;d3.event.sourceEvent.stopPropagation();guitarPick.classed('pick-clicked',true);})@@ -1530,7 +1541,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {.attr("y","11");- gpLocation = guitarPick.attr('transform').split('(')[1].split(',')[0];+ gpLocation = parseFloat(guitarPick.attr('transform').split('(')[1].split(',')[0]);//stop guitarpick if mouseup anywhere on documentd3.select(document).on("mouseup",function(){diff --git a/web/js/ui/wv.ui.mouse.js b/web/js/ui/wv.ui.mouse.jsindex 8ba2dbad7..7b327f04a 100644--- a/web/js/ui/wv.ui.mouse.js+++ b/web/js/ui/wv.ui.mouse.js@@ -96,7 +96,8 @@ wv.ui.mouse.wheel = wv.ui.mouse.wheel || function($element, options) {var end = function() {timer = null;if ( !zoomed ) {- self.events.trigger("change", Math.sign(delta), lastEvent);+ var sign = delta?delta<0?-1:1:0;+ self.events.trigger("change", sign, lastEvent);}lastEvent = null;delta = 0;