fix: unlocked hit elements to take priority

This commit is contained in:
zsviczian 2025-05-26 19:32:50 +00:00
parent fc3e062074
commit fe04998f17

View File

@ -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(