This commit is contained in:
tamaina 2023-05-17 07:01:29 +00:00
parent c83c015357
commit 90a3137ed2

View file

@ -91,10 +91,6 @@ function waitForDecode() {
} }
} }
watch(() => props.src, () => {
waitForDecode();
});
watch([() => props.width, () => props.height, root], () => { watch([() => props.width, () => props.height, root], () => {
const ratio = props.width / props.height; const ratio = props.width / props.height;
if (ratio > 1) { if (ratio > 1) {
@ -140,6 +136,10 @@ async function draw(transfer: boolean = false) {
} }
} }
watch(() => props.src, () => {
waitForDecode();
});
watch(() => props.hash, () => { watch(() => props.hash, () => {
draw(); draw();
}); });