Specific clear of elements
parent
ea40564b29
commit
f55cf1e7ee
|
|
@ -63,34 +63,22 @@ function setDummy(x) {
|
||||||
// timeout used to update every minute
|
// timeout used to update every minute
|
||||||
var drawTimeout;
|
var drawTimeout;
|
||||||
// update the screen
|
// 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() {
|
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.tknGraph.label = currentLabel;
|
layout.tknName.label = (csTokens[ticker]).toUpperCase();
|
||||||
layout.tknName.label = (csTokens[ticker]).toUpperCase();
|
layout.render();
|
||||||
layout.render();
|
|
||||||
|
|
||||||
// Schedule a draw for the next minute
|
// schedule a draw for the next minute
|
||||||
if (drawTimeout) clearTimeout(drawTimeout);
|
if (drawTimeout) clearTimeout(drawTimeout);
|
||||||
drawTimeout = setTimeout(function() {
|
drawTimeout = setTimeout(function() {
|
||||||
drawTimeout = undefined;
|
drawTimeout = undefined;
|
||||||
draw();
|
draw();
|
||||||
}, 1000 - (Date.now() % 1000));
|
}, 1000 - (Date.now() % 1000));
|
||||||
}, 10); // 10ms delay
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update time and draw
|
// update time and draw
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ "id": "coin_info",
|
{ "id": "coin_info",
|
||||||
"name": "Crypto-Coins Info",
|
"name": "Crypto-Coins Info",
|
||||||
"shortName":"Coins Info",
|
"shortName":"Coins Info",
|
||||||
"version": "0.06.17",
|
"version": "0.06.18",
|
||||||
"description": "Crypto-Coins Infos with the help of the Binance API",
|
"description": "Crypto-Coins Infos with the help of the Binance API",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "clkinfo",
|
"tags": "clkinfo",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue