enable modifying event radius from config

This commit is contained in:
Lachlan Kermode
2020-06-08 16:47:34 +02:00
parent c473e4a998
commit 12e309ed8a
9 changed files with 31 additions and 26 deletions

View File

@@ -12,7 +12,8 @@ function MapEvents ({
narrative,
onSelect,
svg,
locations
locations,
eventRadius
}) {
function getCoordinatesForPercent (radius, percent) {
const x = radius * Math.cos(2 * Math.PI * percent)
@@ -55,7 +56,7 @@ function MapEvents ({
return (
<React.Fragment>
{colorSlices.map((color, idx) => {
const r = 10
const r = eventRadius
// Based on the number of events in each location,
// create a slice per event filled with its category color