mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-21 00:23:02 +08:00
onRender functionality
This commit is contained in:
parent
a321ab9b91
commit
c980024e71
@ -237,6 +237,11 @@ class SimpleKeyboard {
|
||||
this.options.onInit();
|
||||
}
|
||||
|
||||
onRender = () => {
|
||||
if(typeof this.options.onRender === "function")
|
||||
this.options.onRender();
|
||||
}
|
||||
|
||||
render = () => {
|
||||
/**
|
||||
* Clear keyboard
|
||||
@ -331,6 +336,20 @@ class SimpleKeyboard {
|
||||
*/
|
||||
this.keyboardDOM.appendChild(rowDOM);
|
||||
});
|
||||
|
||||
/**
|
||||
* Calling onRender
|
||||
*/
|
||||
this.onRender();
|
||||
|
||||
if(!this.initialized){
|
||||
this.initialized = true;
|
||||
|
||||
/**
|
||||
* Calling onInit
|
||||
*/
|
||||
this.onInit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user