mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 20:21:20 -08:00
reset after fontSize change
This commit is contained in:
1 parent
f840edf899
commit
9b153ff0dd
3 files changed
+7
-5
No files matched your search
@@ -170,10 +170,11 @@ export default class Danmuku {
|
||||
|
||||
this.option = Object.assign({}, Danmuku.option, this.option, option);
|
||||
this.validator(this.option, Danmuku.scheme);
|
||||
if (option.fontSize) this.reset();
|
||||
|
||||
this.option.speed = clamp(this.option.speed, 1, 10);
|
||||
this.option.opacity = clamp(this.option.opacity, 0, 1);
|
||||
this.option.fontSize = clamp(this.option.fontSize, 0, 100);
|
||||
this.option.fontSize = clamp(this.option.fontSize, 12, 100);
|
||||
|
||||
this.art.emit('artplayerPluginDanmuku:config', this.option);
|
||||
|
||||
@@ -260,7 +261,7 @@ export default class Danmuku {
|
||||
|
||||
danmu.$ref.style.left = `${clientWidth}px`;
|
||||
danmu.$ref.style.opacity = this.option.opacity;
|
||||
danmu.$ref.style.fontSize = `${this.option.fontSize || danmu.fontSize}px`;
|
||||
danmu.$ref.style.fontSize = `${this.option.fontSize}px`;
|
||||
danmu.$ref.style.color = danmu.color || '#fff';
|
||||
danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color || '#fff'}` : 'none';
|
||||
danmu.$ref.style.marginLeft = '0px';
|
||||
|
||||
Reference in new issue
Block a user