mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
proper fix of GRAPH_NONLOCATED
This commit is contained in:
@@ -92,7 +92,7 @@ const TimelineEvents = ({
|
||||
}
|
||||
}
|
||||
|
||||
let eventY = getCategoryY(event.category)
|
||||
let eventY = getCategoryY ? getCategoryY(event.category) : 0
|
||||
const isNonlocated = !event.latitude && !event.longitude
|
||||
if (features.GRAPH_NONLOCATED && isNonlocated) {
|
||||
const { project } = event
|
||||
|
||||
@@ -51,7 +51,8 @@ const TimelineMarkers = ({
|
||||
}}
|
||||
/>
|
||||
}
|
||||
const isDot = (!features.GRAPH_NONLOCATED && !!event.latitude && !!event.longitude) || (features.GRAPH_NONLOCATED && (event.projectOffset !== -1 || (!!event.latitude && !!event.longitude)))
|
||||
const isNonlocated = !event.latitude && !event.longitude
|
||||
const isBar = (!features.GRAPH_NONLOCATED && isNonlocated) || (features.GRAPH_NONLOCATED && features.GRAPH_NONLOCATED.categories.includes(event.category))
|
||||
switch (event.shape) {
|
||||
case 'circle':
|
||||
return renderCircle()
|
||||
@@ -62,7 +63,7 @@ const TimelineMarkers = ({
|
||||
case 'star':
|
||||
return renderCircle()
|
||||
default:
|
||||
return isDot ? renderCircle() : renderBar()
|
||||
return isBar ? renderBar() : renderCircle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user