From 233ddbfc994d1501a5cc322b2b31c6a61a89eb50 Mon Sep 17 00:00:00 2001 From: efarooqui Date: Tue, 6 Oct 2020 10:19:09 -0700 Subject: [PATCH] Removed logic for selecting all cards on cluster select; putting out PR to get feedback --- src/components/Map.jsx | 11 ----------- src/components/Timeline.jsx | 1 - src/components/presentational/Timeline/Events.js | 2 +- src/store/initial.js | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 8940d17..dfc9743 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -199,19 +199,8 @@ class Map extends React.Component { onClusterSelect (e) { const { id } = e.target const { longitude, latitude } = e.target.attributes - - // const clusterLeaves = this.index.getLeaves(parseInt(id), Infinity, 0) - // const leavesToLocations = mapClustersToLocations(clusterLeaves, this.props.domain.locations) - - // const locationEvents = leavesToLocations.reduce((acc, loc) => { - // loc.events.forEach(evt => acc.push(evt)) - // return acc - // }, []) - const expansionZoom = Math.max(this.index.getClusterExpansionZoom(parseInt(id)), this.index.options.minZoom) this.map.flyTo(new L.LatLng(latitude.value, longitude.value), expansionZoom) - - // this.props.methods.onSelect(locationEvents) } getClientDims () { diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 61e91aa..8c6adef 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -304,7 +304,6 @@ class Timeline extends React.Component { const extraStyle = { ...heightStyle, ...foldedStyle } const contentHeight = { height: dims.contentHeight } const { categories } = this.props.domain - return (
onSelect(event), dims, - highlights: features.HIGHLIGHT_GROUPS ? getHighlights(event.filters[features.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]) : [], + highlights: features.HIGHLIGHT_GROUPS ? getHighlights(event.associations[features.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]) : [], features }) } diff --git a/src/store/initial.js b/src/store/initial.js index 9e38b0e..ade50e9 100644 --- a/src/store/initial.js +++ b/src/store/initial.js @@ -53,7 +53,7 @@ const initial = { maxZoom: 20, bounds: null, maxBounds: [[180, -180], [-180, 180]], - clusterRadius: 20, + clusterRadius: 30, }, timeline: { dimensions: {