fix: resolve background not shown

This commit is contained in:
2026-02-04 09:39:55 +05:00
parent 1e314392af
commit 50f3930bf1
3 changed files with 26 additions and 10 deletions
+3
View File
@@ -69,6 +69,9 @@
<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
+13 -1
View File
@@ -154,7 +154,10 @@
<div class="sidebar">
{#if $uiStore.currentStep === "text" && backgroundImage}
<div class="background-preview">
<h3>Фоновое изображение</h3>
<div class="background-header">
<h3>Фоновое изображение</h3>
<Button variant="secondary" size="sm" onclick={handleUploadNewImage}>Загрузить</Button>
</div>
<img src={backgroundImage} alt="Фон" />
</div>
{/if}
@@ -248,6 +251,13 @@
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.background-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.5rem;
}
.background-preview h3 {
margin: 0;
color: #333;
@@ -257,6 +267,8 @@
.background-preview img {
width: 100%;
max-width: 320px;
height: auto;
border-radius: 4px;
}