mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-10 01:27:43 +00:00
change(web): OSK cookie notes KMW version
This commit is contained in:
parent
39262d978b
commit
9a205474cc
1 changed files with 6 additions and 1 deletions
|
|
@ -515,6 +515,7 @@ namespace com.keyman.osk {
|
|||
c['userSet'] = this.userPositioned ? 1 : 0;
|
||||
c['left'] = p.left;
|
||||
c['top'] = p.top;
|
||||
c['_version'] = utils.Version.CURRENT.toString();
|
||||
|
||||
if(this.vkbd) {
|
||||
c['width'] = this.width.val;
|
||||
|
|
@ -538,6 +539,7 @@ namespace com.keyman.osk {
|
|||
this.userPositioned = util.toNumber(c['userSet'], 0) == 1;
|
||||
this.x = util.toNumber(c['left'],-1);
|
||||
this.y = util.toNumber(c['top'],-1);
|
||||
let cookieVersionString = c['_version'];
|
||||
|
||||
// Restore OSK size - font size now fixed in relation to OSK height, unless overridden (in em) by keyboard
|
||||
let dfltWidth=0.3*screen.width;
|
||||
|
|
@ -563,7 +565,10 @@ namespace com.keyman.osk {
|
|||
newHeight=0.5*screen.height;
|
||||
}
|
||||
|
||||
if(isNewCookie) {
|
||||
// if(!cookieVersionString) - this component was not tracked until 15.0.
|
||||
// Before that point, the OSK's title bar and resize bar heights were not included
|
||||
// in the OSK's cookie-persisted height.
|
||||
if(isNewCookie || !cookieVersionString) {
|
||||
// Adds some space to account for the OSK's header and footer, should they exist.
|
||||
if(this.headerView && this.headerView.layoutHeight.absolute) {
|
||||
newHeight += this.headerView.layoutHeight.val;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue