[FEAT] Img replace fix
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user