mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-01 11:03:04 +08:00
Clean up
This commit is contained in:
parent
eff48f2485
commit
43a859bba9
@ -1153,24 +1153,10 @@ class SimpleKeyboard {
|
|||||||
if (Array.isArray(this.options.modules)) {
|
if (Array.isArray(this.options.modules)) {
|
||||||
this.options.modules.forEach(KeyboardModule => {
|
this.options.modules.forEach(KeyboardModule => {
|
||||||
const keyboardModule = new KeyboardModule();
|
const keyboardModule = new KeyboardModule();
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
if (
|
|
||||||
keyboardModule.constructor.name &&
|
|
||||||
keyboardModule.constructor.name !== "Function"
|
|
||||||
) {
|
|
||||||
const classStr = `module-${this.utilities.camelCase(
|
|
||||||
keyboardModule.constructor.name
|
|
||||||
)}`;
|
|
||||||
this.keyboardPluginClasses =
|
|
||||||
this.keyboardPluginClasses + ` ${classStr}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
keyboardModule.init(this);
|
keyboardModule.init(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.keyboardPluginClasses =
|
this.keyboardPluginClasses = "modules-loaded";
|
||||||
this.keyboardPluginClasses + " modules-loaded";
|
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
this.onModulesLoaded();
|
this.onModulesLoaded();
|
||||||
|
Loading…
Reference in New Issue
Block a user