diff --git a/apps/kineticscroll/ChangeLog b/apps/kineticscroll/ChangeLog index f85af87de..430938d82 100644 --- a/apps/kineticscroll/ChangeLog +++ b/apps/kineticscroll/ChangeLog @@ -2,3 +2,4 @@ 0.02: Minor code improvements 0.03: Better scrolling behaviour 0.04: Fix incorrect appRect handling (missing back buttons and doubled menu titles) +0.05: Bring in change from the firmware implementation forwarding the type of touch (short/long). diff --git a/apps/kineticscroll/boot.js b/apps/kineticscroll/boot.js index 4deb71cc7..4304e98e7 100644 --- a/apps/kineticscroll/boot.js +++ b/apps/kineticscroll/boot.js @@ -50,7 +50,7 @@ if ((menuScrollMin<0 || i>=0) && i{let a=c.h*c.c-Bangle.appRect.h;a{let a=Bangle.appRect;g.reset().clearRect(a).setClipRect(a.x,a.y,a.x2,a.y2);for(var b=h(a.y),d=Math.min(h(a.y2),c.c-1);b<=d;b++)c.draw(b,{x:a.x,y:k(b),w:a.w,h:c.h});g.setClipRect(0,0,g.getWidth()- 1,g.getHeight()-1)},w=()=>{let a=Bangle.appRect;.1=f?f=0:e.scroll-=f*q);var b=u();e.scroll>b&&(e.scroll=b,f=0);e.scrollb){b=Math.max(a.y2-(1-b),a.y);g.setClipRect(a.x,b,a.x2,a.y2);var d=h(b);for(b=k(d);ba.y- -c.h;b-=c.h)c.draw(d,{x:a.x,y:b,w:a.w,h:c.h}),d--;g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);n=void 0}};let x={mode:"custom",back:c.back,drag:a=>{let b=Date.now();q=Math.sign(a.dy);e.scroll-=a.dy;if(0p*q&&0b-r&&(f=q*p/(b-t)*100),t=0;w()},touch:(a,b)=>{a=Bangle.appRect;if(!(b.ym||0<=d)&&d{n&&clearTimeout(n);c.remove()});Bangle.setUI(x); -let e={scroll:E.clip(0|c.scroll,m,u()),draw:()=>{let a=Bangle.appRect;g.reset().clearRect(a).setClipRect(a.x,a.y,a.x2,a.y2);var b=h(a.y);let d=Math.min(h(a.y2),c.c-1);for(;b<=d;b++)c.draw(b,{x:a.x,y:k(b),w:a.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},drawItem:a=>{let b=Bangle.appRect,d=k(a);g.reset().setClipRect(b.x,Math.max(d,b.y),b.x2,Math.min(d+c.h,b.y2));c.draw(a,{x:b.x,y:d,w:b.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},isActive:()=>Bangle.uiRedraw==v},l=e.scroll& --2;e.draw();g.flip();return e}})() \ No newline at end of file +c.h;b-=c.h)c.draw(d,{x:a.x,y:b,w:a.w,h:c.h}),d--;g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);n=void 0}};let x={mode:"custom",back:c.back,drag:a=>{let b=Date.now();q=Math.sign(a.dy);e.scroll-=a.dy;if(0p*q&&0b-r&&(f=q*p/(b-t)*100),t=0;w()},touch:(a,b)=>{a=Bangle.appRect;if(!(b.ym||0<=d)&&d{n&&clearTimeout(n);c.remove()}); +Bangle.setUI(x);let e={scroll:E.clip(0|c.scroll,m,u()),draw:()=>{let a=Bangle.appRect;g.reset().clearRect(a).setClipRect(a.x,a.y,a.x2,a.y2);var b=h(a.y);let d=Math.min(h(a.y2),c.c-1);for(;b<=d;b++)c.draw(b,{x:a.x,y:k(b),w:a.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},drawItem:a=>{let b=Bangle.appRect,d=k(a);g.reset().setClipRect(b.x,Math.max(d,b.y),b.x2,Math.min(d+c.h,b.y2));c.draw(a,{x:b.x,y:d,w:b.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},isActive:()=>Bangle.uiRedraw== +v},l=e.scroll&-2;e.draw();g.flip();return e}})() \ No newline at end of file diff --git a/apps/kineticscroll/metadata.json b/apps/kineticscroll/metadata.json index 528c99792..793e31cd9 100644 --- a/apps/kineticscroll/metadata.json +++ b/apps/kineticscroll/metadata.json @@ -1,12 +1,12 @@ { "id": "kineticscroll", "name": "Kinetic Scroll", "shortName":"Kinetic Scroll", - "version": "0.04", + "version": "0.05", "description": "Replacement for the system scroller with kinetic scrolling.", "icon": "app.png", "type": "bootloader", "tags": "system", - "supports" : ["BANGLEJS2"], + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"kineticscroll.boot.js","url":"boot.min.js"} diff --git a/apps/lint_exemptions.js b/apps/lint_exemptions.js index fa4707e72..b5c6bc640 100644 --- a/apps/lint_exemptions.js +++ b/apps/lint_exemptions.js @@ -1272,7 +1272,7 @@ module.exports = { ] }, "apps/kineticscroll/boot.min.js": { - "hash": "1345b3c556f1a268a81c3a57825d096d9bbce9740217339aa6d79223d9daad4d", + "hash": "0814125a19aff5c608b9357926cd4a4c038334e31b0d07a70deefaf2c77959b9", "rules": [ "no-cond-assign" ]