set swipe handler to beginning

master
Martin Zwigl 2025-03-17 22:33:01 +01:00
parent 5ba54e7a85
commit 047e163a4b
2 changed files with 14 additions and 13 deletions

View File

@ -11,7 +11,20 @@ var timePeriod = "24h";
var tknChrtData = [5,6,5,6,5,6,5,6,5,6,5,6,5,6,];
//
function swipeHandler(lr, ud) {
if (lr == 1) {
ticker = ticker - 1;
if (ticker < 0) ticker = 0;
}
if (lr == -1) {
ticker = ticker + 1;
if (ticker > csTokens.length - 1) ticker = csTokens.length - 1;
}
}
Bangle.on("swipe", swipeHandler);
//
function renderGraph(l) {
// g.clearRect(l.x, l.y, l.w, l.h);
@ -84,18 +97,6 @@ function getChart() {
});
}
//
function swipeHandler(lr, ud) {
if (lr == 1) {
ticker = ticker - 1;
if (ticker < 0) ticker = 0;
}
if (lr == -1) {
ticker = ticker + 1;
if (ticker > csTokens.length - 1) ticker = csTokens.length - 1;
}
}
//
function setLoadMsg(x) {
timePeriod = x;

View File

@ -1,7 +1,7 @@
{ "id": "coin_info",
"name": "Crypto-Coins Info",
"shortName":"Coins Info",
"version": "0.06.43",
"version": "0.06.44",
"description": "Crypto-Coins Infos with the help of the Binance API",
"icon": "app.png",
"tags": "clkinfo",