mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-04-25 22:52:31 +08:00
Utilities adjustment
This commit is contained in:
parent
625a426fef
commit
0f1936b03e
@ -46,7 +46,7 @@ class Utilities {
|
|||||||
return output ? ` hg-button-${output}` : '';
|
return output ? ` hg-button-${output}` : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
static getButtonClass = button => {
|
getButtonClass = button => {
|
||||||
let buttonTypeClass = (button.includes("{") && button !== '{//}') ? "functionBtn" : "standardBtn";
|
let buttonTypeClass = (button.includes("{") && button !== '{//}') ? "functionBtn" : "standardBtn";
|
||||||
let buttonWithoutBraces = button.replace("{", "").replace("}", "");
|
let buttonWithoutBraces = button.replace("{", "").replace("}", "");
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class Utilities {
|
|||||||
return `hg-${buttonTypeClass}${buttonNormalized}`;
|
return `hg-${buttonTypeClass}${buttonNormalized}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getDefaultDiplay(){
|
getDefaultDiplay(){
|
||||||
return {
|
return {
|
||||||
'{bksp}': 'backspace',
|
'{bksp}': 'backspace',
|
||||||
'{backspace}': 'backspace',
|
'{backspace}': 'backspace',
|
||||||
@ -121,7 +121,7 @@ class Utilities {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static getButtonDisplayName = (button, display, mergeDisplay) => {
|
getButtonDisplayName = (button, display, mergeDisplay) => {
|
||||||
if(mergeDisplay){
|
if(mergeDisplay){
|
||||||
display = Object.assign({}, this.getDefaultDiplay(), display);
|
display = Object.assign({}, this.getDefaultDiplay(), display);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user