forked from FOSS/BangleApps
launchb2 0.02: Fix occasional missed image when scrolling up
parent
a84ef8bac4
commit
2d348b39a6
|
@ -55,7 +55,7 @@
|
|||
"name": "Launcher (Bangle.js 2)",
|
||||
"shortName":"Launcher",
|
||||
"icon": "app.png",
|
||||
"version":"0.01",
|
||||
"version":"0.02",
|
||||
"description": "This is needed by Bangle.js 2.0 to display a menu allowing you to choose your own applications. It will not work on Bangle.js 1.0.",
|
||||
"tags": "tool,system,launcher,b2,bno1",
|
||||
"type":"launch",
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
0.01: New App!
|
||||
0.02: Fix occasional missed image when scrolling up
|
||||
|
|
|
@ -47,8 +47,13 @@ Bangle.on('drag',e=>{
|
|||
g.reset().setClipRect(0,24,g.getWidth()-1,g.getHeight()-1);
|
||||
g.scroll(0,dy);
|
||||
menuScroll -= dy;
|
||||
if (e.dy < 0) drawApp(Math.floor((menuScroll+24)/APPH)+n-1);
|
||||
else drawApp(Math.floor((menuScroll+24)/APPH));
|
||||
if (e.dy < 0) {
|
||||
drawApp(Math.floor((menuScroll+24+g.getHeight())/APPH)-1);
|
||||
if (e.dy <= -APPH) drawApp(Math.floor((menuScroll+24+g.getHeight())/APPH)-2);
|
||||
} else {
|
||||
drawApp(Math.floor((menuScroll+24)/APPH));
|
||||
if (e.dy >= APPH) drawApp(Math.floor((menuScroll+24)/APPH)+1);
|
||||
}
|
||||
g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);
|
||||
});
|
||||
Bangle.on("touch",(_,e)=>{
|
||||
|
|
Loading…
Reference in New Issue