Moved map tokens above drawing and fixed token interaction bug

This commit is contained in:
Mitchell McCaffrey 2020-04-19 17:57:49 +10:00
parent e366d88f7e
commit bc5728ffa1

View File

@ -214,6 +214,7 @@ function Map({
left: 0, left: 0,
right: 0, right: 0,
bottom: 0, bottom: 0,
pointerEvents: "none",
}} }}
> >
{Object.values(tokens).map((token) => ( {Object.values(tokens).map((token) => (
@ -259,7 +260,6 @@ function Map({
}} }}
/> />
{mapImage} {mapImage}
{mapTokens}
<MapDrawing <MapDrawing
width={mapData ? mapData.width : 0} width={mapData ? mapData.width : 0}
height={mapData ? mapData.height : 0} height={mapData ? mapData.height : 0}
@ -268,6 +268,7 @@ function Map({
onShapeAdd={handleShapeAdd} onShapeAdd={handleShapeAdd}
onShapeRemove={handleShapeRemove} onShapeRemove={handleShapeRemove}
/> />
{mapTokens}
</Box> </Box>
</Box> </Box>
<MapControls <MapControls