chore: Bump version to 5.1.2 and update style.less in artplayer-plugin-danmuku

This commit is contained in:
Harvey Zack committed 2024-06-05 09:13:11 +08:00
1 parent 8aea92f40a
commit 403be5dc6b
6 files changed
+80 -15

No files matched your search

@@ -180,12 +180,12 @@ export default class Danmuku {
const fontSize = this.option.fontSize;
if (typeof fontSize === 'number') {
return clamp(fontSize, 12, clientHeight);
return Math.round(clamp(fontSize, 12, clientHeight));
}
if (typeof fontSize === 'string' && fontSize.endsWith('%')) {
const ratio = parseFloat(fontSize) / 100;
return clamp(clientHeight * ratio, 12, clientHeight);
return Math.round(clamp(clientHeight * ratio, 12, clientHeight));
}
return Danmuku.option.fontSize;