mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 20:21:20 -08:00
chore: Bump version to 5.1.2 and update style.less in artplayer-plugin-danmuku
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user