fix
This commit is contained in:
@@ -522,13 +522,20 @@ const useDocumentDrag = () => {
|
||||
}
|
||||
state.moved = true;
|
||||
if (!state.groupElevated) {
|
||||
state.groupDocIds.forEach((id) => {
|
||||
if (id === state.docKey) {
|
||||
bringToFront(state.docId);
|
||||
} else {
|
||||
bringToFront(id);
|
||||
}
|
||||
const layout = layoutRef.current;
|
||||
const sortedGroup = state.groupDocIds
|
||||
.filter((id) => id !== state.docKey)
|
||||
.sort((a, b) => {
|
||||
const aZ = layout.get(a)?.z ?? 0;
|
||||
const bZ = layout.get(b)?.z ?? 0;
|
||||
return aZ - bZ;
|
||||
});
|
||||
|
||||
sortedGroup.forEach((id) => {
|
||||
bringToFront(id);
|
||||
});
|
||||
|
||||
bringToFront(state.docId);
|
||||
state.groupElevated = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user