Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add supercluster visualization #162

Merged
merged 27 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fb16d3a
Building with supercluster; working on map refactor
Sep 28, 2020
cb8e021
Clustering working upon zoom; loading cluster data appropriately init…
Sep 29, 2020
f0a862a
Individual points showing with cluster logic; need to define styling …
Sep 29, 2020
f104bc1
Creating cluster styling and component to handle cluster visualizatio…
Sep 30, 2020
96f1274
Working cluster visualization; need to modify styling for clusters fo…
Sep 30, 2020
37b50f0
Cluster sizes showing up appropriately and unclustering upon zoom; ne…
Sep 30, 2020
426a57c
Getting appropriate clusterZoom; flyto moving to incorrect location o…
Sep 30, 2020
02e6a3c
Working onCluster select; zooming in and watching clusters break down…
Sep 30, 2020
ca3e773
Broken onClick clusters working after validating longitude and latitu…
Oct 1, 2020
748917d
Working on select that selects all events in a cluster; need to confi…
Oct 5, 2020
45d3735
Removed logic for selecting all cards on cluster select; putting out …
Oct 6, 2020
05bfc20
Linting fixes
Oct 6, 2020
65a4347
Removing commented out sections
Oct 6, 2020
d7935df
Working filters with added check to make sure empty locations dont cr…
Oct 7, 2020
f32e757
Configuring maxbounds in config to allow pan to not snap out of center
Oct 8, 2020
b615ebb
Rewrote opacity alg for clusters
Oct 13, 2020
b6d3d45
Modified cluster styling to have gradients
Oct 15, 2020
ae8e3df
Changed back to normal opacities instead of radial gradients; could a…
Oct 15, 2020
c5c5b69
Modified clusters to take in radial gradient as input if specified
Oct 15, 2020
04adf39
Linting fixes
Oct 19, 2020
1321bc6
Created utility function isIdentical; moved DefsClusters into Cluster…
Oct 19, 2020
f102ba4
Some linting fixes
Oct 19, 2020
e0d9bf0
Injecting loading overlay into map for cases where domain hasnt been …
Oct 19, 2020
944771f
Removed line
Oct 20, 2020
42e1d9f
Loads index when locations are finally available in props; added thro…
Oct 20, 2020
fdfcfc1
Linting fixes
Oct 20, 2020
2a7ed2f
Merging in develop branch
Oct 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed logic for selecting all cards on cluster select; putting out …
…PR to get feedback
  • Loading branch information
efarooqui committed Oct 6, 2020
commit 45d37355de98168561477a6b69ee6c90699229f0
11 changes: 0 additions & 11 deletions src/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
1 change: 0 additions & 1 deletion src/components/Timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/presentational/Timeline/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const initial = {
maxZoom: 20,
bounds: null,
maxBounds: [[180, -180], [-180, 180]],
clusterRadius: 20,
clusterRadius: 30,
},
timeline: {
dimensions: {
Expand Down