fix(editor): disable snap-to-midpoint menu item when arrow-binding disabled (#10885)
This commit is contained in:
@@ -181,6 +181,21 @@
|
|||||||
box-shadow: 0 0 0 1px var(--color-brand-active);
|
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 {
|
svg {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
|
|||||||
@@ -469,6 +469,7 @@ const PreferencesToggleMidpointSnappingItem = () => {
|
|||||||
return (
|
return (
|
||||||
<DropdownMenuItemCheckbox
|
<DropdownMenuItemCheckbox
|
||||||
checked={appState.isMidpointSnappingEnabled}
|
checked={appState.isMidpointSnappingEnabled}
|
||||||
|
disabled={appState.bindingPreference === "disabled"}
|
||||||
onSelect={(event) => {
|
onSelect={(event) => {
|
||||||
actionManager.executeAction(actionToggleMidpointSnapping);
|
actionManager.executeAction(actionToggleMidpointSnapping);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user