From fa23980917ebcd91bcb34534a6af639aa4fe8b22 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 Jan 2026 19:03:33 +0100 Subject: [PATCH] [FEAT] Img replace fix --- src/composables/useLayers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/useLayers.ts b/src/composables/useLayers.ts index 6bcd40d..a4c40ce 100644 --- a/src/composables/useLayers.ts +++ b/src/composables/useLayers.ts @@ -333,7 +333,8 @@ export const useLayers = () => { while (currentSprites.length < index) { 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 { currentSprites.push(...newSprites); }