diff --git a/src/components/MapControls.js b/src/components/MapControls.js index 3e8716a..cc3ecd8 100644 --- a/src/components/MapControls.js +++ b/src/components/MapControls.js @@ -80,21 +80,23 @@ function MapControls({ ":active": { color: "secondary" }, }} > - onBrushGridSnappingChange(!useBrushGridSnapping)} - > - {useBrushGridSnapping ? : } - + {useBrushGridSnapping ? ( + onBrushGridSnappingChange(false)} + > + + + ) : ( + onBrushGridSnappingChange(true)} + > + + + )} Grid Lock diff --git a/src/icons/GridOffIcon.js b/src/icons/GridOffIcon.js index a1287c2..d7b2950 100644 --- a/src/icons/GridOffIcon.js +++ b/src/icons/GridOffIcon.js @@ -8,6 +8,8 @@ function GridOffIcon() { viewBox="0 0 24 24" width="24" fill="currentcolor" + // Fixes bug with not firing click event when used in a button + style={{ pointerEvents: "none" }} > diff --git a/src/icons/GridOnIcon.js b/src/icons/GridOnIcon.js index 1796b30..0511b25 100644 --- a/src/icons/GridOnIcon.js +++ b/src/icons/GridOnIcon.js @@ -8,6 +8,8 @@ function GridOnIcon() { viewBox="0 0 24 24" width="24" fill="currentcolor" + // Fixes bug with not firing click event when used in a button + style={{ pointerEvents: "none" }} >