Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix piece image layout #548

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>