mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-11 10:07:42 +00:00
Tweaks kmwembedded's touchMenuPos.
This commit is contained in:
parent
36bc731b28
commit
e27d351e51
2 changed files with 5 additions and 3 deletions
|
|
@ -143,7 +143,7 @@ extension KeymanWebViewController {
|
|||
}
|
||||
let components = result.components(separatedBy: ",")
|
||||
let x = CGFloat(Float(components[0])!)
|
||||
let y = CGFloat(Float(components[1])!) + Manager.shared._inputViewController!.activeTopBarHeight // KMW doesn't adjust for this!
|
||||
let y = CGFloat(Float(components[1])!)
|
||||
let w = CGFloat(Float(components[2])!)
|
||||
let h = CGFloat(Float(components[3])!)
|
||||
completion(KeymanWebViewController.keyFrame(x: x, y: y, w: w, h: h))
|
||||
|
|
|
|||
|
|
@ -407,8 +407,10 @@ namespace com.keyman.text {
|
|||
|
||||
var w=key.offsetWidth,
|
||||
h=key.offsetHeight,
|
||||
x=dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(osk.vkbd.kbdDiv) + w/2,
|
||||
y=dom.Utils.getAbsoluteY(key) - dom.Utils.getAbsoluteY(osk.vkbd.kbdDiv);
|
||||
// Since the full OSKManager '_Box' is displayed within the keyboards' WebViews,
|
||||
// these calculations should be performed with respect to that, rather than osk.vkbd.kbdDiv.
|
||||
x=dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(osk._Box) + w/2,
|
||||
y=dom.Utils.getAbsoluteY(key) - dom.Utils.getAbsoluteY(osk._Box);
|
||||
|
||||
return x+','+y+','+w+','+h;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue