mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
Refactor Setting class to fix formatting and event handling
This commit is contained in:
1 parent
e8c317051a
commit
49704ffc29
3 files changed
+7
-9
No files matched your search
@@ -4599,9 +4599,7 @@ class Setting extends (0, _componentDefault.default) {
|
||||
this.render();
|
||||
}
|
||||
});
|
||||
art.on("resize", ()=>{
|
||||
this.resize();
|
||||
});
|
||||
art.on("resize", ()=>this.resize());
|
||||
}
|
||||
}
|
||||
get builtin() {
|
||||
@@ -4673,7 +4671,8 @@ class Setting extends (0, _componentDefault.default) {
|
||||
const target = this.find(setting.name);
|
||||
if (target) {
|
||||
Object.assign(target, setting);
|
||||
this.reset();
|
||||
this.format();
|
||||
this.render();
|
||||
} else this.add(setting);
|
||||
}
|
||||
add(setting) {
|
||||
|
||||
Reference in new issue
Block a user