mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-12-05 18:55:28 +03:00
fix: zindex test
This commit is contained in:
1 file changed
+7
-7
@@ -89,9 +89,12 @@ const populateElements = (
|
||||
},
|
||||
);
|
||||
|
||||
// initialize `boundElements` on containers, if applicable
|
||||
API.setElements(
|
||||
newElements.map((element, index, elements) => {
|
||||
// Set the elements and the selection in one update: rendering in between
|
||||
// would pair the new elements with the previous selection, which can point
|
||||
// at elements that are now deleted
|
||||
act(() => {
|
||||
// initialize `boundElements` on containers, if applicable
|
||||
h.elements = newElements.map((element, index, elements) => {
|
||||
const nextElement = elements[index + 1];
|
||||
if (
|
||||
nextElement &&
|
||||
@@ -104,10 +107,7 @@ const populateElements = (
|
||||
};
|
||||
}
|
||||
return element;
|
||||
}),
|
||||
);
|
||||
|
||||
act(() => {
|
||||
});
|
||||
h.setState({
|
||||
...selectGroupsForSelectedElements(
|
||||
{ ...h.state, ...appState, selectedElementIds },
|
||||
|
||||
Reference in new issue
Block a user