Skip to content

Commit

Permalink
Fix piece image layout
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfish-shogi committed Jun 23, 2023
1 parent 22832f6 commit 547518a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/renderer/view/primitive/BoardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
:style="square.backgroundStyle"
/>
<div v-for="piece in layout.piece" :key="piece.id" :style="piece.style">
<img class="full" :src="piece.imagePath" />
<img class="piece-image" :src="piece.imagePath" />
</div>
<div v-for="label in layout.labels" :key="label.id" :style="label.style">
{{ label.character }}
Expand Down Expand Up @@ -70,7 +70,7 @@
:key="piece.id"
:style="piece.style"
>
<img class="full" :src="piece.imagePath" />
<img class="piece-image" :src="piece.imagePath" />
</div>
<div
v-for="pointer in layout.blackHand.pointers"
Expand All @@ -96,7 +96,7 @@
:key="piece.id"
:style="piece.style"
>
<img class="full" :src="piece.imagePath" />
<img class="piece-image" :src="piece.imagePath" />
</div>
<div
v-for="pointer in layout.whiteHand.pointers"
Expand All @@ -111,10 +111,13 @@
:style="layout.promotion.style"
>
<div class="select-button promote" @click="clickPromote($event)">
<img class="full" :src="layout.promotion.promoteImagePath" />
<img class="piece-image" :src="layout.promotion.promoteImagePath" />
</div>
<div class="select-button not-promote" @click="clickNotPromote($event)">
<img class="full" :src="layout.promotion.notPromoteImagePath" />
<img
class="piece-image"
:src="layout.promotion.notPromoteImagePath"
/>
</div>
</div>
<div class="turn" :style="layout.turn.style">{{ nextMoveLabel }}</div>
Expand Down Expand Up @@ -508,4 +511,8 @@ const whitePlayerTimeSeverity = computed(() => {
justify-content: center;
align-items: center;
}
.piece-image {
max-width: 100%;
max-height: 100%;
}
</style>

0 comments on commit 547518a

Please sign in to comment.