[FEAT] Img replace fix

This commit is contained in:
2026-01-07 19:03:33 +01:00
parent 06ab1e45db
commit fa23980917

View File

@@ -333,7 +333,8 @@ export const useLayers = () => {
while (currentSprites.length < index) { while (currentSprites.length < index) {
currentSprites.push(createEmptySprite()); currentSprites.push(createEmptySprite());
} }
currentSprites.splice(index, 0, ...newSprites); // Replace existing sprites at the target index instead of shifting them
currentSprites.splice(index, newSprites.length, ...newSprites);
} else { } else {
currentSprites.push(...newSprites); currentSprites.push(...newSprites);
} }