mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 08:37:42 +00:00
chore(web): Merge branch 'refactor/web/osk-keyboard-view' into refactor/web/osk-cleanup-and-init
This commit is contained in:
commit
bc4e61b4bd
4 changed files with 10 additions and 4 deletions
|
|
@ -107,6 +107,12 @@ namespace com.keyman.keyboards {
|
|||
return this.scriptObject['KH'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Embedded JS script designed for use with a keyboard's HTML help text. Always defined
|
||||
* within the file referenced by &kmw_embedjs in a keyboard's source, though that file
|
||||
* may also contain _other_ script definitions as well. (`KHF` must be explicitly defined
|
||||
* within that file.)
|
||||
*/
|
||||
get hasScript(): boolean {
|
||||
return !!this.scriptObject['KHF'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ namespace com.keyman.text {
|
|||
*/
|
||||
keymanweb['correctOSKTextSize']=function() {
|
||||
let osk: com.keyman.osk.OSKManager = keymanweb.osk;
|
||||
if(osk && osk.vkbd && osk.vkbd.adjustHeights(osk.getKeyboardHeight())) {
|
||||
if(osk?.vkbd?.adjustHeights(osk.getKeyboardHeight())) {
|
||||
var b: HTMLElement = osk._Box, bs=b.style;
|
||||
bs.height=bs.maxHeight=osk.vkbd.computedAdjustedOskHeight(osk.getHeight())+'px';
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ namespace com.keyman.osk {
|
|||
} else {
|
||||
this.vkbd.adjustHeights(this.getKeyboardHeight());
|
||||
|
||||
var b: HTMLElement = this._Box, bs=b.style;
|
||||
let b: HTMLElement = this._Box, bs=b.style;
|
||||
bs.height=bs.maxHeight=this.vkbd.computedAdjustedOskHeight(this.getHeight())+'px';
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ namespace com.keyman.osk {
|
|||
kbdID = kbdID.substring(kbdID.indexOf('::') + 2);
|
||||
}
|
||||
|
||||
var kbdClassSuffix = ' kmw-keyboard-' + kbdID;
|
||||
const kbdClassSuffix = ' kmw-keyboard-' + kbdID;
|
||||
kbdView.element.className = kbdView.element.className + kbdClassSuffix;
|
||||
|
||||
this.banner.appendStyles();
|
||||
|
|
|
|||
|
|
@ -1536,7 +1536,7 @@ namespace com.keyman.osk {
|
|||
* @param {Object} PKbd the keyboard object to be displayed
|
||||
* @param {string=} argFormFactor layout form factor, defaulting to 'desktop'
|
||||
* @param {(string|number)=} argLayerId name or index of layer to show, defaulting to 'default'
|
||||
* @param {Object} height Target height for the rendered keyboard
|
||||
* @param {number} height Target height for the rendered keyboard
|
||||
* (currently required for legacy reasons)
|
||||
* @return {Object} DIV object with filled keyboard layer content
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue