mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
return bar markers rendering
This commit is contained in:
@@ -163,7 +163,7 @@ export function calcOpacity (num) {
|
||||
* other events there are in the same render. The idea here is that the
|
||||
* overlaying of events builds up a 'heat map' of the event space, where
|
||||
* darker areas represent more events with proportion */
|
||||
const base = num >= 1 ? 0.6 : 0
|
||||
const base = num >= 1 ? 0.3 : 0
|
||||
return base + (Math.min(0.5, 0.08 * (num - 1)))
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export default ({
|
||||
className='event'
|
||||
x={x}
|
||||
y={y - sectionHeight + (idx * sectionHeight) + (sectionHeight / 2)}
|
||||
style={{ ...styleProps, opacity: h ? 0.5 : 0.1 }}
|
||||
style={{ ...styleProps, opacity: h ? 0.3 : 0.1 }}
|
||||
width={width}
|
||||
height={sectionHeight}
|
||||
/>
|
||||
|
||||
@@ -21,7 +21,7 @@ function renderDot (event, styles, props) {
|
||||
function renderBar (event, styles, props) {
|
||||
const fillOpacity = props.features.GRAPH_NONLOCATED
|
||||
? event.projectOffset >= 0 ? styles.opacity : 0.5
|
||||
: 0.6
|
||||
: calcOpacity(1)
|
||||
|
||||
return <DatetimeBar
|
||||
onSelect={props.onSelect}
|
||||
|
||||
@@ -36,7 +36,7 @@ const TimelineMarkers = ({
|
||||
className='timeline-marker'
|
||||
x={0}
|
||||
y={0}
|
||||
width={eventRadius / 3}
|
||||
width={eventRadius / 2}
|
||||
height={dims.contentHeight - 55}
|
||||
stroke={styles ? styles.stroke : colors.primaryHighlight}
|
||||
stroke-opacity='1'
|
||||
@@ -48,7 +48,8 @@ const TimelineMarkers = ({
|
||||
}}
|
||||
/>
|
||||
}
|
||||
const isNonlocated = !event.latitude && !event.longitude
|
||||
const isDot = (!!event.location && !!event.longitude) || (features.GRAPH_NONLOCATED && event.projectOffset !== -1)
|
||||
|
||||
switch (event.shape) {
|
||||
case 'circle':
|
||||
return renderCircle()
|
||||
@@ -59,7 +60,7 @@ const TimelineMarkers = ({
|
||||
case 'star':
|
||||
return renderCircle()
|
||||
default:
|
||||
return (!features.GRAPH_NONLOCATED && isNonlocated) ? renderBar : renderCircle()
|
||||
return isDot ? renderCircle() : renderBar()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user