Fix draw define first
parent
274b51853f
commit
ffc8d201e3
|
|
@ -56,10 +56,7 @@
|
|||
WIDGETS["widsmartbatt"] = {
|
||||
area: "tr",
|
||||
width: 30,
|
||||
draw: function() {
|
||||
// Call your drawing function
|
||||
draw();
|
||||
}
|
||||
draw: draw
|
||||
};
|
||||
|
||||
// Touch to temporarily show battery percent
|
||||
|
|
@ -73,7 +70,6 @@
|
|||
if (w.x - oversize <= x && x < w.x + width + oversize
|
||||
&& w.y - oversize <= y && y < w.y + height + oversize) {
|
||||
E.stopEventPropagation && E.stopEventPropagation();
|
||||
Bangle.buzz(20);
|
||||
showPercent = true;
|
||||
setTimeout(() => {
|
||||
showPercent = false;
|
||||
|
|
@ -87,7 +83,7 @@
|
|||
Bangle.on('charging', function () {
|
||||
WIDGETS["widsmartbatt"].draw();
|
||||
});
|
||||
//draw once per minute...
|
||||
|
||||
var id = setInterval(() => WIDGETS["widsmartbatt"].draw(), 60000);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue