mirror of
https://github.com/excalidraw/excalidraw
synced 2025-07-25 13:58:22 +08:00
fix: unlocked hit elements to take priority
This commit is contained in:
@ -7253,7 +7253,12 @@ class App extends React.Component<AppProps, AppState> {
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
// Prioritize unlocked elements over locked ones
|
||||
if (unlockedHitElements.length > 0) {
|
||||
// If there are unlocked elements, use the topmost one
|
||||
pointerDownState.hit.element =
|
||||
unlockedHitElements[unlockedHitElements.length - 1];
|
||||
} else if (
|
||||
hitElementMightBeLocked &&
|
||||
hitElementMightBeLocked.locked &&
|
||||
!unlockedHitElements.some(
|
||||
|
Reference in New Issue
Block a user