pull in 'Ensure that changing a menu item when half-scrolled off screen doesn't overwrite widgets' from the standard scroller
parent
9db02af9f1
commit
81bc99b7a1
|
|
@ -1,2 +1,4 @@
|
||||||
0.01: Inital release.
|
0.01: Inital release.
|
||||||
0.02: Rebasing on latest changes to showScroller_Q3 (https://github.com/espruino/Espruino/commit/2d3c34ef7c2b9fe2118e816aacd2e096adb99596).
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ var s = {
|
||||||
g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);
|
g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);
|
||||||
}, drawItem : i => {
|
}, drawItem : i => {
|
||||||
var y = idxToY(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});
|
options.draw(i, {x:R.x,y:y,w:R.w,h:options.h});
|
||||||
g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);
|
g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1);
|
||||||
}};
|
}};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "swscroll",
|
"id": "swscroll",
|
||||||
"name": "Swipe menus",
|
"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.",
|
"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",
|
"readme": "README.md",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue