Merge pull request #1738 from thyttan/thyttan-kbswipe

[Swipe keyboard] Consider widget field for marker positioning
pull/1743/head^2
Gordon Williams 2022-04-25 09:57:31 +01:00 committed by GitHub
commit 60288734e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -1,2 +1,3 @@
0.01: New App!
0.02: Now keeps user input trace intact by changing how the screen is updated.
0.03: Positioning of marker now takes the height of the widget field into account.

View File

@ -54,18 +54,18 @@ exports.getStrokes( (id,s) => Bangle.strokes[id] = Unistroke.new(s) );
if (strArr.length == 0) {
Rx1 = 4;
Rx2 = 6*4;
Ry1 = 8*4;
Ry2 = 8*4 + 3;
Ry1 = 8*4 + R.y;
Ry2 = 8*4 + 3 + R.y;
} else if (strArr.length <= 4) {
Rx1 = (strArr[strArr.length-1].length)%7*6*4 + 4 ;
Rx2 = (strArr[strArr.length-1].length)%7*6*4 + 6*4;
Ry1 = (strArr.length)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4);
Ry2 = (strArr.length)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + 3;
Ry1 = (strArr.length)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + R.y;
Ry2 = (strArr.length)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + 3 + R.y;
} else {
Rx1 = (strArr[strArr.length-1].length)%7*6*4 + 4 ;
Rx2 = (strArr[strArr.length-1].length)%7*6*4 + 6*4;
Ry1 = (4)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4);
Ry2 = (4)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + 3;
Ry1 = (4)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + R.y;
Ry2 = (4)*(8*4) + Math.floor((strArr[strArr.length-1].length)/7)*(8*4) + 3 + R.y;
}
//print(Rx1,Rx2,Ry1, Ry2);
return {x:Rx1,y:Ry1,x2:Rx2,y2:Ry2};

View File

@ -1,6 +1,6 @@
{ "id": "kbswipe",
"name": "Swipe keyboard",
"version":"0.02",
"version":"0.03",
"description": "A library for text input via PalmOS style swipe gestures (beta!)",
"icon": "app.png",
"type":"textinput",