hwid-batt: factor width
parent
a3042f206a
commit
60287b7252
|
|
@ -24,7 +24,7 @@
|
||||||
function draw() {
|
function draw() {
|
||||||
if (typeof old_x === 'undefined') old_x = this.x;
|
if (typeof old_x === 'undefined') old_x = this.x;
|
||||||
if (typeof old_y === 'undefined') old_y = this.y;
|
if (typeof old_y === 'undefined') old_y = this.y;
|
||||||
var s = 29;
|
var s = width - 1;
|
||||||
var x = this.x;
|
var x = this.x;
|
||||||
var y = this.y;
|
var y = this.y;
|
||||||
if ((typeof x === 'undefined') || (typeof y === 'undefined')) {
|
if ((typeof x === 'undefined') || (typeof y === 'undefined')) {
|
||||||
|
|
@ -65,6 +65,7 @@
|
||||||
|
|
||||||
Bangle.on('charging',function(charging) { draw(); });
|
Bangle.on('charging',function(charging) { draw(); });
|
||||||
var id = setInterval(()=>WIDGETS["hwid_a_battery_widget"].draw(), intervalLow);
|
var id = setInterval(()=>WIDGETS["hwid_a_battery_widget"].draw(), intervalLow);
|
||||||
|
var width = 30;
|
||||||
|
|
||||||
WIDGETS["hwid_a_battery_widget"]={area:"tr",width:30,draw:draw};
|
WIDGETS["hwid_a_battery_widget"]={area:"tr",width,draw:draw};
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue