removes numbers, increases opacity for more events instead

This commit is contained in:
Lachlan Kermode
2020-02-24 05:55:00 +13:00
parent 8bf783b30e
commit afc84e61ac
6 changed files with 38 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react'
import { Portal } from 'react-portal'
import colors from '../../../common/global.js'
import { getEventOpacity } from '../../../common/utilities'
function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation, selected, narrative, onSelect, svg, locations }) {
function getCoordinatesForPercent (radius, percent) {
@@ -33,7 +34,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
fill: getCategoryColor(locCategory),
stroke: colors.darkBackground,
strokeWidth: 0,
fillOpacity: 0.85,
fillOpacity: getEventOpacity(location.events),
...extraStyles
})
@@ -108,7 +109,11 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
}
const customStyles = styleLocation ? styleLocation(location) : null
const extraRender = (customStyles) ? customStyles[1] : null
const extraRender = () => (
<React.Fragment>
{customStyles[1]}
</React.Fragment>
)
const isSelected = selected.reduce((acc, event) => {
return acc || (event.latitude === location.latitude && event.longitude === location.longitude)