feat: backgorund image shown only once

This commit is contained in:
2026-02-04 09:35:58 +05:00
parent 2fdd98bafe
commit 1e314392af
3 changed files with 39 additions and 24 deletions
-18
View File
@@ -64,29 +64,11 @@
<Button variant="primary" size="sm" onclick={onDownload}>Скачать</Button>
</div>
<div class="preview-sections">
<!-- Превью чистой картинки -->
<div class="preview-section">
<h3>Фон</h3>
<div class="canvas-container">
<Stage width={320} height={panel.height}>
<Layer>
{#if backgroundImage}
<Image image={backgroundImage} width={320} height={panel.height} />
{/if}
</Layer>
</Stage>
</div>
</div>
<!-- Превью с текстом -->
<div class="preview-section">
<h3>Финальный результат</h3>
<div class="canvas-container">
<Stage width={320} height={panel.height}>
<Layer>
{#if backgroundImage}
<Image image={backgroundImage} width={320} height={panel.height} />
{/if}
{#each panel.texts || [] as textItem (textItem.id)}
{@const textPosition = getTextPosition(textItem)}
<Text