diff --git a/apps/swscroll/ChangeLog b/apps/swscroll/ChangeLog index c5fc9dcb4..b35c27001 100644 --- a/apps/swscroll/ChangeLog +++ b/apps/swscroll/ChangeLog @@ -1,2 +1,4 @@ 0.01: Inital release. 0.02: Rebasing on latest changes to showScroller_Q3 (https://github.com/espruino/Espruino/commit/2d3c34ef7c2b9fe2118e816aacd2e096adb99596). +0.03: Rebasing on latest changes to showScroller_Q3 (https://github.com/espruino/Espruino/commit/b6f8105b6348bb6f7cd03ac11efc1f3585c6ad79). Ensure that changing a menu item when half-scrolled off screen doesn't overwrite widgets. + diff --git a/apps/swscroll/boot.js b/apps/swscroll/boot.js index 2b1b00de3..57a5d8fb3 100644 --- a/apps/swscroll/boot.js +++ b/apps/swscroll/boot.js @@ -95,7 +95,7 @@ var s = { g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1); }, drawItem : i => { var y = idxToY(i); - g.reset().setClipRect(R.x,y,R.x2,y+options.h); + g.reset().setClipRect(R.x,Math.max(y,R.y),R.x2,Math.min(y+options.h,R.y2)); options.draw(i, {x:R.x,y:y,w:R.w,h:options.h}); g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1); }}; diff --git a/apps/swscroll/metadata.json b/apps/swscroll/metadata.json index 4edbfa2ba..eff55e4bd 100644 --- a/apps/swscroll/metadata.json +++ b/apps/swscroll/metadata.json @@ -1,7 +1,7 @@ { "id": "swscroll", "name": "Swipe menus", - "version": "0.02", + "version": "0.03", "description": "Replace built in E.showScroller to act on swipe instead of drag. Navigate menus in discrete steps instead of a continuous motion.", "readme": "README.md", "icon": "app.png",