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