Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Remove duplicate onmousedown event #1084

Benjamin Kingb46984a708d9
diff --git a/web/js/components/range-selection/dragger.js b/web/js/components/range-selection/dragger.js
index 7e9b9258a..9491a3d0f 100644
--- a/web/js/components/range-selection/dragger.js
+++ b/web/js/components/range-selection/dragger.js
@@ -95,9 +95,6 @@ class TimelineDragger extends React.Component {
visibility: visibility
}}
d={this.props.path}
- onMouseDown={() => {
- this.props.onMouseDown(this.props.id);
- }}
transform={
'translate(' +
-this.props.width / 2 +
diff --git a/web/js/date/compare-picks.js b/web/js/date/compare-picks.js
index 9d570cb23..48d6fbdc2 100644
--- a/web/js/date/compare-picks.js
+++ b/web/js/date/compare-picks.js
@@ -27,8 +27,8 @@ export function timelineCompare(models, config, ui) {
var init = function() {
mountObjectA = document.createElementNS(xmlns, 'g');
mountObjectB = document.createElementNS(xmlns, 'g');
- mountObjectA.onmousedown = toggleCheck;
- mountObjectB.onmousedown = toggleCheck;
+ mountObjectA.addEventListener('mousedown', toggleCheck);
+ mountObjectB.addEventListener('mousedown', toggleCheck);
parentSvg = document.getElementById('timeline-footer-svg');
parentSvg.appendChild(mountObjectA);
parentSvg.appendChild(mountObjectB);
@@ -94,7 +94,6 @@ export function timelineCompare(models, config, ui) {
},
yOffset: 15,
path: PICK_PATH,
- onMouseDown: onMouseDown,
height: 59.51,
width: 58.42,
textColor: null,
@@ -107,11 +106,6 @@ export function timelineCompare(models, config, ui) {
text: label
};
};
- var onMouseDown = function(id) {
- if (models.date.activeDate !== id) {
- models.compare.toggleState();
- }
- };
var updateState = function() {
self.comparePickA.setState({
position: getLocationFromStringDate(models.date['selected'])