fetch text height only after mask has been loaded

このコミットが含まれているのは:
Henry Jameson 2022-08-23 02:06:54 +03:00
コミット 6e1639cc1e
1個のファイルの変更8行の追加3行の削除

ファイルの表示

@ -60,9 +60,14 @@ const UpdateNotification = {
}
},
mounted () {
setTimeout(() => {
this.contentHeight = this.$refs.animatedText.scrollHeight
}, 1000)
// Workaround to get the text height only after mask loaded. A bit hacky.
const newImg = new Image()
newImg.onload = () => {
setTimeout(() => {
this.contentHeight = this.$refs.animatedText.scrollHeight
}, 100)
}
newImg.src = this.pleromaTanVariant === pleromaTan ? pleromaTanMask : pleromaTanFoxMask
}
}