From 9dd5eabd3ad3f84389071df20a5d2f594d3cc8f5 Mon Sep 17 00:00:00 2001 From: efarooqui Date: Tue, 6 Oct 2020 10:31:17 -0700 Subject: [PATCH] Linting fixes --- src/common/utilities.js | 12 ++-- src/components/Layout.js | 4 +- src/components/Map.jsx | 5 +- src/components/initialization.js | 69 ------------------- .../presentational/Map/Clusters.jsx | 5 +- src/store/initial.js | 2 +- 6 files changed, 13 insertions(+), 84 deletions(-) delete mode 100644 src/components/initialization.js diff --git a/src/common/utilities.js b/src/common/utilities.js index 78d3443..4c74d30 100644 --- a/src/common/utilities.js +++ b/src/common/utilities.js @@ -172,16 +172,16 @@ export function calcClusterSize (pointCount, numClusters) { return Math.min(50, 10 + (pointCount / numClusters) * 10) } -export function isLatitude(lat) { - return !!lat && isFinite(lat) && Math.abs(lat) <= 90; +export function isLatitude (lat) { + return !!lat && isFinite(lat) && Math.abs(lat) <= 90 } -export function isLongitude(lng) { - return !!lng && isFinite(lng) && Math.abs(lng) <= 180; +export function isLongitude (lng) { + return !!lng && isFinite(lng) && Math.abs(lng) <= 180 } -export function mapClustersToLocations(clusters, locations) { - return clusters.map(cl => locations.find(location => location.label === cl.properties.id)) +export function mapClustersToLocations (clusters, locations) { + return clusters.map(cl => locations.find(location => location.label === cl.properties.id)) } export const dateMin = function () { diff --git a/src/components/Layout.js b/src/components/Layout.js index 5930283..b6ea66f 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -259,7 +259,7 @@ class Dashboard extends React.Component { } return ( -
+
' + feature.properties.point_count_abbreviated + '
', - className: 'marker-cluster marker-cluster-' + size, - iconSize: L.point(40, 40) - }); - - return L.marker(latlng, { - icon: icon - }); -} - -L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors' -}).addTo(map); \ No newline at end of file diff --git a/src/components/presentational/Map/Clusters.jsx b/src/components/presentational/Map/Clusters.jsx index f7164ab..ad441b1 100644 --- a/src/components/presentational/Map/Clusters.jsx +++ b/src/components/presentational/Map/Clusters.jsx @@ -9,7 +9,7 @@ function ClusterEvents ({ onSelect, svg, clusters, - numClusters, + numClusters }) { function renderClusterBySize (cluster) { const { point_count: pointCount, cluster_id: clusterId } = cluster.properties @@ -20,7 +20,7 @@ function ClusterEvents ({ fill: colors.fallbackEventColor, stroke: colors.darkBackground, strokeWidth: 0, - fillOpacity: calcOpacity(pointCount), + fillOpacity: calcOpacity(pointCount) }) return ( @@ -39,7 +39,6 @@ function ClusterEvents ({ ) } - function renderCluster (cluster) { /** { diff --git a/src/store/initial.js b/src/store/initial.js index ade50e9..b8080c4 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: 30, + clusterRadius: 30 }, timeline: { dimensions: {