
* change lock label * feat: add unlock logic for single units on pointer up * feat: add unlock popup * fix: linting errors * style: padding tweaks * style: remove redundant line * feat: lock multiple units together * style: tweak color & position * feat: add highlight for locked elements * feat: select groups correctly after unlocking * test: update snapshots * fix: lasso from selecting locked elements * fix: should prevent selecting unlocked elements and setting locked id at the same time * fix: reset hit locked id immediately when appropriate * feat: capture locked units in delta * test: update locking test * feat: show lock highlight when locking (including undo/redo) * feat: make locked highlighting consistent * feat: show correct cursor type when moving over locked elements * fix history * remove `lockedUnits.singleUnits` * tweak button * do not render UnlockPopup if not locked element selected * tweak actions * refactor: simplify type * refactor: rename type * refactor: simplify hit element setting & checking * fix: prefer locked over link * rename to `activeLockedId` * refactor: getElementAtPosition takes an optional hitelments array * fix: avoid setting active locked id after resizing --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
41 lines
730 B
SCSS
41 lines
730 B
SCSS
@import "../css/variables.module.scss";
|
|
|
|
.excalidraw {
|
|
.UnlockPopup {
|
|
position: absolute;
|
|
z-index: var(--zIndex-interactiveCanvas);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
border-radius: 0.5rem;
|
|
background: var(--island-bg-color);
|
|
box-shadow: var(--shadow-island);
|
|
padding: 0.8rem;
|
|
cursor: pointer;
|
|
color: var(--color-gray-60);
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
svg {
|
|
display: block;
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
color: var(--color-gray-60);
|
|
}
|
|
|
|
&:hover {
|
|
svg {
|
|
color: var(--color-primary);
|
|
}
|
|
}
|
|
&:active {
|
|
svg {
|
|
transform: scale(0.95);
|
|
}
|
|
}
|
|
}
|
|
}
|