Added map fog permissions

This commit is contained in:
Mitchell McCaffrey
2020-04-29 21:12:57 +10:00
parent aeb33058bb
commit 4b9b06395d
4 changed files with 32 additions and 4 deletions

View File

@@ -202,6 +202,13 @@ function MapContols({
}
}
// Move back to pan tool if selected tool becomes disabled
useEffect(() => {
if (disabledControls.includes(selectedToolId)) {
onSelectedToolChange("pan");
}
}, [disabledControls]);
// Stop map drawing from happening when selecting controls
// Not using react events as they seem to trigger after dom events
useEffect(() => {