Merge pull request #99 from forensic-architecture/fix/event-narrative-order

Put event locations on top of narrative arrows in map
This commit is contained in:
Lachlan Kermode
2019-02-08 16:31:09 +00:00
committed by GitHub
3 changed files with 13 additions and 5 deletions

View File

@@ -243,9 +243,9 @@ class Map extends React.Component {
{this.renderMarkers()}
{isShowingSites ? this.renderSites() : null}
{this.renderShapes()}
{this.renderEvents()}
{this.renderNarratives()}
{this.renderSelected()}
{this.renderEvents()}
{this.renderSelected()}
</React.Fragment>
) : null

View File

@@ -108,7 +108,9 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
return (
<Portal node={svg}>
{locations.map(renderLocation)}
<g className='event-locations'>
{locations.map(renderLocation)}
</g>
</Portal>
)
}

View File

@@ -135,11 +135,17 @@ function MapNarratives ({ styles, onSelectNarrative, svg, narrative, narratives,
)
}
if (narrative === null) return (<div />)
if (narrative === null) return (
<Portal node={svg}>
<g/>
</Portal>
)
return (
<Portal node={svg}>
{narratives.map(n => renderNarrative(n))}
<g className='narratives'>
{narratives.map(n => renderNarrative(n))}
</g>
</Portal>
)
}