mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21: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
@@ -58,9 +58,7 @@ export default class Setting extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
art.on('resize', () => {
|
||||
this.resize();
|
||||
});
|
||||
art.on('resize', () => this.resize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +166,8 @@ export default class Setting extends Component {
|
||||
const target = this.find(setting.name);
|
||||
if (target) {
|
||||
Object.assign(target, setting);
|
||||
this.reset();
|
||||
this.format();
|
||||
this.render();
|
||||
} else {
|
||||
this.add(setting);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user