Added token outlines

This commit is contained in:
Mitchell McCaffrey
2021-04-24 18:21:49 +10:00
parent aa9a8979e1
commit f7975c041a
8 changed files with 249 additions and 47 deletions

View File

@@ -30,16 +30,9 @@ function MapInteraction({
}) {
const [mapImage, mapImageStatus] = useMapImage(map);
// Map loaded taking in to account different resolutions
const [mapLoaded, setMapLoaded] = useState(false);
useEffect(() => {
if (
!map ||
!mapState ||
// FIXME
(map.type === "file" && !map.file && !map.resolutions) ||
mapState.mapId !== map.id
) {
if (!map || !mapState || mapState.mapId !== map.id) {
setMapLoaded(false);
} else if (mapImageStatus === "loaded") {
setMapLoaded(true);