mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-08-03 13:56:07 +00:00
fix(frontend): Blurhashのサイズ算出用の値が誤っていた問題を修正 (#17849)
* fix(frontend): Blurhashのサイズ算出用の値が誤っていた問題を修正 * clean up * Update Changelog
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
-
|
||||
|
||||
### Client
|
||||
-
|
||||
- Fix: 画像の表示時にBlurhashが描画されない場合があるのを修正
|
||||
|
||||
### Server
|
||||
- Fix: 既にミュートしているスレッドに対して再度スレッドミュートを作成しようとするとサーバーエラーになる問題を修正
|
||||
|
||||
@@ -81,7 +81,10 @@ const bitmapTmp = shallowRef<CanvasImageSource | undefined>();
|
||||
|
||||
watch([() => props.width, () => props.height, canvas], () => {
|
||||
const ratio = props.width / props.height;
|
||||
if (ratio > 1) {
|
||||
if (!Number.isFinite(ratio) || ratio <= 0) {
|
||||
canvasWidth.value = 64;
|
||||
canvasHeight.value = 64;
|
||||
} else if (ratio > 1) {
|
||||
canvasWidth.value = Math.round(64 * ratio);
|
||||
canvasHeight.value = 64;
|
||||
} else {
|
||||
|
||||
@@ -18,8 +18,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
key="canvas"
|
||||
:class="$style.canvas"
|
||||
:blurhash="hash ?? null"
|
||||
:height="imgHeight ?? undefined"
|
||||
:width="imgWidth ?? undefined"
|
||||
:height="props.height"
|
||||
:width="props.width"
|
||||
:onlyAvgColor="props.onlyAvgColor"
|
||||
:show="hide"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user