Fix drawings being erased when drawing tool not selected

This commit is contained in:
Mitchell McCaffrey 2021-01-02 09:17:56 +11:00
parent f24156c44c
commit ae98b54c7b

View File

@ -34,7 +34,7 @@ function MapDrawing({
const [isBrushDown, setIsBrushDown] = useState(false); const [isBrushDown, setIsBrushDown] = useState(false);
const [erasingShapes, setErasingShapes] = useState([]); const [erasingShapes, setErasingShapes] = useState([]);
const shouldHover = toolSettings.type === "erase"; const shouldHover = toolSettings.type === "erase" && active;
const isBrush = const isBrush =
toolSettings.type === "brush" || toolSettings.type === "paint"; toolSettings.type === "brush" || toolSettings.type === "paint";
const isShape = const isShape =