generate real fractional index after z-index actions

This commit is contained in:
Ryan Di
2023-12-05 13:06:00 +08:00
parent d1a9c593cc
commit 093e684d9e
4 changed files with 98 additions and 22 deletions

View File

@@ -328,7 +328,9 @@ class Scene {
if (element.frameId) {
this.insertElementAtIndex(element, this.getElementIndex(element.frameId));
} else {
this.replaceAllElements([...this.elements, element]);
this.replaceAllElements(
normalizeFractionalIndicies([...this.elements, element]),
);
}
};