Fix
This commit is contained in:
@@ -153,7 +153,15 @@ export const useLayers = () => {
|
||||
URL.revokeObjectURL(s.url);
|
||||
} catch {}
|
||||
}
|
||||
|
||||
if (layers.value.length > 1) {
|
||||
// If there are multiple layers, we want to maintain frame alignment
|
||||
// so we replace the sprite with an empty one instead of shifting
|
||||
l.sprites[i] = createEmptySprite();
|
||||
} else {
|
||||
// If there's only one layer, we can safely remove the frame
|
||||
l.sprites.splice(i, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const removeSprites = (ids: string[]) => {
|
||||
@@ -175,7 +183,12 @@ export const useLayers = () => {
|
||||
URL.revokeObjectURL(s.url);
|
||||
} catch {}
|
||||
}
|
||||
|
||||
if (layers.value.length > 1) {
|
||||
l.sprites[i] = createEmptySprite();
|
||||
} else {
|
||||
l.sprites.splice(i, 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user