Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix ie11 svg issue, firefox minor svg tweaks, remove css, remove svg optimize to revert to auto

Edward Plato3d04ccd1eb35
diff --git a/web/js/components/range-selection/range-selection.js b/web/js/components/range-selection/range-selection.js
index 1b20be4e1..735ff9b7b 100644
--- a/web/js/components/range-selection/range-selection.js
+++ b/web/js/components/range-selection/range-selection.js
@@ -263,8 +263,9 @@ class TimelineRangeSelector extends React.Component {
<svg
id="wv-timeline-range-selector"
className="wv-timeline-range-selector"
+ width={this.props.width}
+ height={75}
style={{
- width: this.props.width,
left: this.props.parentOffset
}}
>
diff --git a/web/js/components/timeline/timeline-axis/dragger-container.js b/web/js/components/timeline/timeline-axis/dragger-container.js
index bf2d697e2..d833708a7 100644
--- a/web/js/components/timeline/timeline-axis/dragger-container.js
+++ b/web/js/components/timeline/timeline-axis/dragger-container.js
@@ -240,7 +240,7 @@ class DraggerContainer extends PureComponent {
};
return (
draggerSelected === 'selectedB'
- ? <svg className="dragger-container" width={width}>
+ ? <svg className="dragger-container" width={width} height={83}>
{compareModeActive
? <Dragger
{...sharedProps}
@@ -258,7 +258,7 @@ class DraggerContainer extends PureComponent {
draggerVisible={draggerVisibleB}
/>
</svg>
- : <svg className="dragger-container" width={width}>
+ : <svg className="dragger-container" width={width} height={83}>
{compareModeActive
? <Dragger
{...sharedProps}
diff --git a/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js b/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js
index 88f751670..4121ad14a 100644
--- a/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js
+++ b/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js
@@ -90,25 +90,21 @@ class TileRect extends PureComponent {
return (
<React.Fragment>
<g onMouseMove={this.showHover}>
- <rect className="axis-grid-rect" width={gridWidth} height={100}
+ <rect className="axis-grid-rect" width={gridWidth} height={65}
transform={`translate(${index * gridWidth}, 0)`}
fill={item.withinRange ? 'rgba(0,0,0,0)' : 'black'}
- shapeRendering="optimizeSpeed"
/>
<line className="axis-grid-line" stroke="black" strokeLinecap="round"
strokeWidth="0.2" x1="0" x2="0" y1="0" y2={lineLengthY}
transform={`translate(${index * gridWidth + 2.2}, 0)`}
- shapeRendering="optimizeSpeed"
/>
<line className="axis-grid-line" stroke="#555" strokeWidth={1} x1="0" x2={gridWidth}
y1="46" y2="46"
transform={`translate(${index * gridWidth + 1}, 0)`}
- shapeRendering="optimizeSpeed"
/>
<line className="axis-grid-line" stroke="white" strokeLinecap="round"
strokeWidth={whiteLineStrokeWidth} x1="0" x2="0" y1="0" y2={lineLengthY}
transform={`translate(${index * gridWidth + 1}, 0)`}
- shapeRendering="optimizeSpeed"
/>
</g>
</React.Fragment>
diff --git a/web/js/components/timeline/timeline-axis/grid-range/tile-text.js b/web/js/components/timeline/timeline-axis/grid-range/tile-text.js
index 4623e24d0..bb9c48428 100644
--- a/web/js/components/timeline/timeline-axis/grid-range/tile-text.js
+++ b/web/js/components/timeline/timeline-axis/grid-range/tile-text.js
@@ -26,7 +26,7 @@ const axisScaleTextElementWrapper = (item, index, gridWidth) => {
<text className="axis-grid-text" x="0" y="42"
fill={item.withinRange ? 'white' : ''}
transform={`translate(${(index * gridWidth) + xOffsetAdded}, 20)`}
- textRendering="optimizeSpeed" clipPath="url(#textDisplay)"
+ clipPath="url(#textDisplay)"
>
{dateText}
</text>
diff --git a/web/js/components/timeline/timeline-axis/hover-line.js b/web/js/components/timeline/timeline-axis/hover-line.js
index 86a3d57dc..b676df993 100644
--- a/web/js/components/timeline/timeline-axis/hover-line.js
+++ b/web/js/components/timeline/timeline-axis/hover-line.js
@@ -20,10 +20,10 @@ class HoverLine extends PureComponent {
let showHover = !isTimelineDragging && !isAnimationDraggerDragging && showHoverLine;
return (
showHover
- ? <svg className='timeline-hover-line-container' width={width}>
+ ? <svg className='timeline-hover-line-container' width={width} height={63}>
<line className='timeline-hover-line'
stroke='blue' strokeWidth='2' strokeOpacity='0.48' x1='0' x2='0' y1='0' y2='63'
- transform={`translate(${hoverLinePosition + 1}, 0)`} shapeRendering='optimizeSpeed'
+ transform={`translate(${hoverLinePosition + 1}, 0)`}
/>
</svg>
: null
diff --git a/web/js/components/timeline/timeline-axis/timeline-axis.js b/web/js/components/timeline/timeline-axis/timeline-axis.js
index ecc82919e..6347a360d 100644
--- a/web/js/components/timeline/timeline-axis/timeline-axis.js
+++ b/web/js/components/timeline/timeline-axis/timeline-axis.js
@@ -832,7 +832,7 @@ class TimelineAxis extends Component {
draggerPositionB = draggerPositionB + deltaX;
animationStartLocation = animationStartLocation + deltaX;
animationEndLocation = animationEndLocation + deltaX;
- // PRE/POST GRIDARRAY UPDATE NOT NECESSARY FOR YEAR SINCE ALL YEARS ARE DISPLAYED
+ // update not necessary for year since all years are displayed
if (timeScale === 'year') {
let frontDate = this.state.currentTimeRange[0].rawDate;
let backDate = this.state.currentTimeRange[this.state.currentTimeRange.length - 1].rawDate;
@@ -1148,7 +1148,7 @@ class TimelineAxis extends Component {
? <svg className='timeline-axis-svg'
id='timeline-footer-svg'
width={axisWidth}
- height={70}
+ height={64}
viewBox={`0 0 ${axisWidth} 75`}
preserveAspectRatio='xMinYMin slice'>
<defs>
diff --git a/web/js/components/timeline/timeline-axis/timeline-dragger.js b/web/js/components/timeline/timeline-axis/timeline-dragger.js
index c26750431..769938346 100644
--- a/web/js/components/timeline/timeline-axis/timeline-dragger.js
+++ b/web/js/components/timeline/timeline-axis/timeline-dragger.js
@@ -67,7 +67,7 @@ class Dragger extends PureComponent {
axis='x'
onMouseDown={this.selectDragger}
onDrag={this.handleDragDragger}
- position={{ x: draggerPosition - 12, y: -20 }}
+ position={{ x: draggerPosition - 12, y: 0 }}
onStart={this.startShowDraggerTime}
onStop={this.stopShowDraggerTime}
disabled={disabled}
diff --git a/web/js/components/timeline/timeline.css b/web/js/components/timeline/timeline.css
index 759399ac4..fef2306fa 100644
--- a/web/js/components/timeline/timeline.css
+++ b/web/js/components/timeline/timeline.css
@@ -1,5 +1,5 @@
-@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:500');
+@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300,500');
.timeline-axis-container {
height: 65px;
@@ -7,7 +7,6 @@
}
.timeline-axis-svg {
- height: 64px;
display: flex;
flex-direction: row;
align-items: center;
@@ -22,7 +21,6 @@
font-size: 17px;
font-family: 'Roboto Mono', monospace;
border-radius: 5px;
- width: 115px;
height: 25px;
line-height: 25px;
white-space: nowrap;
@@ -31,22 +29,10 @@
}
.date-tooltip-day {
+ position: relative;
+ bottom: 2px;
font-size: 14px;
- display: inline-block;
- vertical-align: top;
-}
-
-.axis-grid-container,
-.timeline-dragger {
- display: flex;
- flex-direction: row;
- align-items: center;
-}
-
-.axis-grid-rect {
- color: white;
- font-size: 12px;
- height: 63px;
+ font-weight: 300;
}
.axis-grid-text {
@@ -193,18 +179,6 @@
background-position: -206px -63px;
}
-.timeline-hamburger-date {
- position: relative;
- width: 20px;
- left: 15px;
- top: 5px;
- font-weight: 800;
- letter-spacing: 2px;
- font-size: 14px;
- color: white;
- background: rgba(40, 40, 40, 0.9);
-}
-
.date-arrow-wrapper {
width: 60px;
}
@@ -247,7 +221,7 @@
#wv-timeline-range-selector {
position: absolute;
- bottom: -75px;
+ bottom: 0;
overflow: hidden;
pointer-events: none;
}
@@ -259,7 +233,7 @@
.dragger-container {
pointer-events: none;
position: absolute;
- bottom: -87px;
+ bottom: 0;
}
.dragger * {
@@ -267,13 +241,9 @@
}
.timeline-hover-line-container {
- position: absolute;
- bottom: -87px;
pointer-events: none;
-}
-
-.timeline-hover-line {
- display: 'block';
+ position: absolute;
+ bottom: 0;
}
/* Mobile date picker */