• I was following the example at https://www.espruino.com/Reference#l_E_s­howScroller for how to use the e.showScroller function for Bangle.js 2. I copied this code from the tutorial:

    E.showScroller({
      h : 40, c : 8,
      draw : (idx, r) => {
        g.setBgColor((idx&1)?"#fff":"#ccc").clea­rRect(r.x,r.y,r.x+r.w-1,r.y+r.h-1);
        g.setFont("6x8:2").drawString("Item Number\n"+idx,r.x+10,r.y+4);
      },
      select : (idx) => console.log("You selected ", idx)
    });
    

    It works, but the bottom number gets cuts off as you scroll. The issue is shown in the video below.
    Is there any way I can fix this?


    1 Attachment

About

Avatar for Ronin @Ronin started