mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 18:48:31 +01:00
fix
This commit is contained in:
parent
579c570c53
commit
2ea02051a1
1 changed files with 6 additions and 2 deletions
|
@ -124,7 +124,7 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
|
||||||
ctx.drawImage(imgEl, 0, 0);
|
ctx.drawImage(imgEl, 0, 0);
|
||||||
|
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
if (config.fileUrl) {
|
if (config.fileUrl != null || config.fileId != null) {
|
||||||
const watermark = new Image();
|
const watermark = new Image();
|
||||||
watermark.onload = () => {
|
watermark.onload = () => {
|
||||||
const canvasAspectRatio = canvas.width / canvas.height; // 横長は1より大きい
|
const canvasAspectRatio = canvas.width / canvas.height; // 横長は1より大きい
|
||||||
|
@ -247,8 +247,12 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
|
||||||
watermarkUrl = config.fileUrl!;
|
watermarkUrl = config.fileUrl!;
|
||||||
}
|
}
|
||||||
|
|
||||||
watermark.src = config.__bypassMediaProxy ? config.fileUrl : getProxiedImageUrl(watermarkUrl, undefined, true);
|
watermark.src = config.__bypassMediaProxy ? watermarkUrl : getProxiedImageUrl(watermarkUrl, undefined, true);
|
||||||
|
} else {
|
||||||
|
resolve();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
resolve();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue