mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
Removed logic for selecting all cards on cluster select; putting out PR to get feedback
This commit is contained in:
@@ -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 () {
|
||||
|
||||
@@ -304,7 +304,6 @@ class Timeline extends React.Component {
|
||||
const extraStyle = { ...heightStyle, ...foldedStyle }
|
||||
const contentHeight = { height: dims.contentHeight }
|
||||
const { categories } = this.props.domain
|
||||
|
||||
return (
|
||||
<div className={classes} style={extraStyle} onKeyDown={this.props.onKeyDown} tabIndex='1'>
|
||||
<Header
|
||||
|
||||
@@ -110,7 +110,7 @@ const TimelineEvents = ({
|
||||
eventRadius,
|
||||
onSelect: () => 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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ const initial = {
|
||||
maxZoom: 20,
|
||||
bounds: null,
|
||||
maxBounds: [[180, -180], [-180, 180]],
|
||||
clusterRadius: 20,
|
||||
clusterRadius: 30,
|
||||
},
|
||||
timeline: {
|
||||
dimensions: {
|
||||
|
||||
Reference in New Issue
Block a user