• Thanks for the quick fix @Ganblejs - I'm just pulling that into the main app loader now.

    Wrt Bangle.dragHandler it looks like none of the apps mess with it directly, so it could be changed. Or perhaps we could do:

    if (mode=="updown") {
        let dy = 0, oldDrag = options.drag;
        delete options.drag;
        Bangle.dragHandler = e=>{
          dy += e.dy;
          if (!e.b) dy=0;
          while (Math.abs(dy)>32) {
            if (dy>0) { dy-=32; cb(1) }
            else { dy+=32; cb(-1) }
            Bangle.buzz(20);
          }
          options.drag&&options.drag(e);
        };
        ...
    

    OR (and maybe this makes more sense) we just throw an exception if options.drag is defined in the updown or leftright modes? It feels like if you want it maybe you should just be using custom mode instead, and I'm not sure we should be making the code more complex for these edge cases?

  • OR (and maybe this makes more sense) we just throw an exception if options.drag is defined in the updown or leftright modes? It feels like if you want it maybe you should just be using custom mode instead, and I'm not sure we should be making the code more complex for these edge cases?

    I think this is the way.

    There's a part of me that thinks it's cool to be able to add on the custom handler on top of the standard updown and leftright ones - but not worth the trade off I think.

About

Avatar for Gordon @Gordon started