mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-23 02:07:09 +02:00
fix: do not auto-add elements to locked frame (#9851)
* Do not return locked frames when filtering for top level frame * lint * lint * lint
This commit is contained in:
@@ -5708,8 +5708,9 @@ class App extends React.Component<AppProps, AppState> {
|
||||
const elementsMap = this.scene.getNonDeletedElementsMap();
|
||||
const frames = this.scene
|
||||
.getNonDeletedFramesLikes()
|
||||
.filter((frame): frame is ExcalidrawFrameLikeElement =>
|
||||
isCursorInFrame(sceneCoords, frame, elementsMap),
|
||||
.filter(
|
||||
(frame): frame is ExcalidrawFrameLikeElement =>
|
||||
!frame.locked && isCursorInFrame(sceneCoords, frame, elementsMap),
|
||||
);
|
||||
|
||||
return frames.length ? frames[frames.length - 1] : null;
|
||||
|
Reference in New Issue
Block a user