Non-structure locations are marked as approximated

This commit is contained in:
Franc Camps-Febrer
2019-01-31 18:37:23 -05:00
parent 4e000c8137
commit 8147af2620
4 changed files with 7 additions and 5 deletions

View File

@@ -61,6 +61,7 @@ class Card extends React.Component {
<CardLocation
language={this.props.language}
location={this.props.event.location}
isPrecise={(this.props.event.type === 'Structure')}
/>
)
}

View File

@@ -3,13 +3,13 @@ import React from 'react'
import copy from '../../../js/data/copy.json'
import { isNotNullNorUndefined } from '../../../js/utilities'
const CardLocation = ({ language, location }) => {
const CardLocation = ({ language, location, isPrecise }) => {
if (isNotNullNorUndefined(location)) {
return (
<div className='card-cell location'>
<p>
<i className='material-icons left'>location_on</i>
{location}
{`${location}${(isPrecise) ? '' : ' (Approximated)'}`}
</p>
</div>
)

View File

@@ -28,7 +28,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
let cumulativeAngleSweep = 0;
return (
<g>
<React.Fragment>
{colorSlices.map((color, idx) => {
const r = 10
@@ -48,7 +48,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
`M ${startX} ${startY}`, // Move
`A ${r} ${r} 0 ${largeArcFlag} 1 ${endX} ${endY}`, // Arc
`L 0 0 `, // Line
`L ${startX} ${startY} `, // Line
`L ${startX} ${startY} Z`, // Line
].join(' ');
const extraStyles = ({
@@ -66,7 +66,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
)
})}
</g>
</React.Fragment>
)
}

View File

@@ -170,6 +170,7 @@
}
.location-event-marker {
pointer-events: all;
fill: $event_default;
stroke-width: 0;
}