add event counts for locations

This commit is contained in:
Lachlan Kermode
2019-01-08 13:00:33 +00:00
parent 56b8677827
commit 899e06d560
5 changed files with 15 additions and 11 deletions

View File

@@ -168,8 +168,10 @@ class Map extends React.Component {
* components in the <g/> div.
*/
styleLocation(location) {
const noEvents = location.events.length
return [
{ fill: 'orange' },
null,
() => noEvents > 1 ? <text className='location-count' dx='-3' dy='4'>{noEvents}</text> : null
]
}