fix(editor): disable snap-to-midpoint menu item when arrow-binding disabled (#10885)

This commit is contained in:
David Luzar
2026-03-04 16:48:33 +01:00
committed by GitHub
parent d1cff91b75
commit 47c254216b
2 changed files with 16 additions and 0 deletions
@@ -181,6 +181,21 @@
box-shadow: 0 0 0 1px var(--color-brand-active);
}
&[disabled] {
cursor: not-allowed;
opacity: 0.5;
pointer-events: none;
&:hover {
background-color: transparent;
}
&:active {
background-color: transparent;
box-shadow: none;
}
}
svg {
width: 1rem;
height: 1rem;
@@ -469,6 +469,7 @@ const PreferencesToggleMidpointSnappingItem = () => {
return (
<DropdownMenuItemCheckbox
checked={appState.isMidpointSnappingEnabled}
disabled={appState.bindingPreference === "disabled"}
onSelect={(event) => {
actionManager.executeAction(actionToggleMidpointSnapping);
event.preventDefault();