Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add extra width to date tool tip for num greater than 99

Ed Platoe6fe31b3d832
diff --git a/web/js/components/timeline/timeline-axis/date-tooltip/date-tooltip.js b/web/js/components/timeline/timeline-axis/date-tooltip/date-tooltip.js
index 5076dc15b..5b8dff242 100644
--- a/web/js/components/timeline/timeline-axis/date-tooltip/date-tooltip.js
+++ b/web/js/components/timeline/timeline-axis/date-tooltip/date-tooltip.js
@@ -81,22 +81,26 @@ class DateToolTip extends PureComponent {
return (
<React.Fragment>
{ (showDraggerToolTip || showHoverToolTip) &&
- <div
- className="date-tooltip"
- style={{
- transform: `translate(${toolTipLeftOffest}px, -100px)`,
- display: toolTipDisplay,
- width: hasSubdailyLayers ? '232px' : '165px'
- }}
- >
- { toolTipDate } <span className="date-tooltip-day">({ toolTipDayOfYear })</span>
- </div>
+ <div
+ className="date-tooltip"
+ style={{
+ transform: `translate(${toolTipLeftOffest}px, -100px)`,
+ display: toolTipDisplay,
+ width: hasSubdailyLayers
+ ? toolTipDayOfYear >= 100
+ ? '239px'
+ : '232px'
+ : '165px'
+ }}
+ >
+ { toolTipDate } <span className="date-tooltip-day">({ toolTipDayOfYear })</span>
+ </div>
}
</React.Fragment>
);
}
}
-
+// 237px
DateToolTip.propTypes = {
axisWidth: PropTypes.number,
draggerPosition: PropTypes.number,