From 8bf93a7dec9c5329d797e53f6ab266c82429353d Mon Sep 17 00:00:00 2001 From: efarooqui Date: Wed, 23 Sep 2020 08:36:03 -0700 Subject: [PATCH 1/2] Working multi-select; need to stop firing update timerange upon select --- src/components/presentational/Map/Events.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/presentational/Map/Events.jsx b/src/components/presentational/Map/Events.jsx index f2fe193..588d4c0 100644 --- a/src/components/presentational/Map/Events.jsx +++ b/src/components/presentational/Map/Events.jsx @@ -21,6 +21,11 @@ function MapEvents ({ return [x, y] } + function handleEventSelect (e, location) { + const events = e.shiftKey ? selected.concat(location.events) : location.events + onSelect(events) + } + function renderBorder () { return ( @@ -135,7 +140,7 @@ function MapEvents ({ onSelect(location.events)} + onClick={(e) => handleEventSelect(e, location)} > {renderLocationSlicesByCategory(location)} {extraRender ? extraRender() : null} From 15729da731409adc402d33d8ee413b28f7726c13 Mon Sep 17 00:00:00 2001 From: efarooqui Date: Wed, 23 Sep 2020 13:13:11 -0700 Subject: [PATCH 2/2] Timeline no longer adjusts upon selection of events; set of events aren't modified according to their place in the timeline --- src/components/Timeline.jsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 11b9d87..61e91aa 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -57,12 +57,6 @@ class Timeline extends React.Component { if (nextProps.dimensions.trackHeight !== this.props.dimensions.trackHeight) { this.computeDims() } - - if (hash(nextProps.app.selected) !== hash(this.props.app.selected)) { - if (!!nextProps.app.selected && nextProps.app.selected.length > 0) { - this.onCenterTime(nextProps.app.selected[0].datetime) - } - } } addEventListeners () {