Specific clear of elements

master
Martin Zwigl 2025-03-16 00:17:04 +01:00
parent ea40564b29
commit f55cf1e7ee
2 changed files with 14 additions and 26 deletions

View File

@ -63,34 +63,22 @@ function setDummy(x) {
// timeout used to update every minute
var drawTimeout;
// update the screen
// function draw() {
// layout.tknGraph.label = currentLabel;
// layout.tknName.label = (csTokens[ticker]).toUpperCase();
// layout.render();
//
// // schedule a draw for the next minute
// if (drawTimeout) clearTimeout(drawTimeout);
// drawTimeout = setTimeout(function() {
// drawTimeout = undefined;
// draw();
// }, 1000 - (Date.now() % 1000));
// }
function draw() {
g.clear();
//
layout.clear(layout.tknName);
layout.clear(layout.tknGraph);
// Add a small delay to ensure the screen has time to clear
setTimeout(function() {
//
layout.tknGraph.label = currentLabel;
layout.tknName.label = (csTokens[ticker]).toUpperCase();
layout.render();
// Schedule a draw for the next minute
// schedule a draw for the next minute
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = setTimeout(function() {
drawTimeout = undefined;
draw();
}, 1000 - (Date.now() % 1000));
}, 10); // 10ms delay
}
// update time and draw

View File

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