openstmap Update for drag event refactor
parent
532f1fe6a7
commit
fec0aad0eb
|
|
@ -1464,7 +1464,7 @@
|
|||
"name": "OpenStreetMap",
|
||||
"shortName":"OpenStMap",
|
||||
"icon": "app.png",
|
||||
"version":"0.07",
|
||||
"version":"0.08",
|
||||
"description": "[BETA] Loads map tiles from OpenStreetMap onto your Bangle.js and displays a map of where you are",
|
||||
"tags": "outdoors,gps,b2",
|
||||
"custom": "custom.html",
|
||||
|
|
|
|||
|
|
@ -5,3 +5,4 @@
|
|||
0.05: Show currently active gpsrec GPS trace (fix #395)
|
||||
0.06: Add support for scrolling, option for 3 bit maps
|
||||
0.07: Move to 96px tiles - less files (64 -> 25) and speed up rendering
|
||||
0.08: Update for drag event refactor
|
||||
|
|
|
|||
|
|
@ -49,15 +49,17 @@ if (HASWIDGETS) {
|
|||
|
||||
redraw();
|
||||
|
||||
setWatch(function() {
|
||||
function recenter() {
|
||||
if (!fix.fix) return;
|
||||
m.lat = fix.lat;
|
||||
m.lon = fix.lon;
|
||||
redraw();
|
||||
}, BTN2, {repeat:true});
|
||||
}
|
||||
|
||||
setWatch(recenter, global.BTN2?BTN2:BTN1, {repeat:true});
|
||||
|
||||
var hasScrolled = false;
|
||||
E.on('touch',e=>{
|
||||
Bangle.on('drag',e=>{
|
||||
if (e.b) {
|
||||
g.setClipRect(0,y1,g.getWidth()-1,y2);
|
||||
g.scroll(e.dx,e.dy);
|
||||
|
|
|
|||
Loading…
Reference in New Issue