Skip to content

Commit

Permalink
Fixed a bad bug
Browse files Browse the repository at this point in the history
  • Loading branch information
knowthelist committed Feb 23, 2015
1 parent ea7c07b commit df7ed7e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions js/fhem-tablet-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ $( document ).ready(function() {
.appendTo($(this));

knob_elem.knob({
'min':0,
'max':70,
'min': $(this).data('min') || 0,
'max': $(this).data('max') || 70,
'height':150,
'width':150,
//'step':.5,
Expand Down Expand Up @@ -223,8 +223,8 @@ function update() {
"isValue": clima.temp,
'release' : function (v) {
if (ready){
setFhemStatus(device, $(this).o.cmd + ' ' + v);
$.toast('Set '+ device + $(this).o.cmd + ' ' + v );
setFhemStatus(device, this.o.cmd + ' ' + v);
$.toast('Set '+ device + this.o.cmd + ' ' + v );
}
}
});
Expand Down Expand Up @@ -275,8 +275,8 @@ function update() {
{
'release' : function (v) {
if (ready){
console.log('Set Homestatus to' + $(this).o.status);
setFhemStatus(device, $(this).o.cmd + ' ' + $(this).o.status);
console.log('Set Homestatus to' + this.o.status);
setFhemStatus(device, this.o.cmd + ' ' + this.o.status);
}
}
});
Expand Down Expand Up @@ -422,6 +422,10 @@ var drawDial = function () {
a = this.arc(this.cv), // Arc
pa, // Previous arc
r = 1;


//force canvas to redraw
c.clearRect(0,0, this.$c.width, this.$c.height);
c.lineWidth = this.lineWidth;
c.lineCap = this.lineCap;
if (this.o.bgColor !== "none") {
Expand Down Expand Up @@ -503,9 +507,6 @@ var drawDial = function () {
});
}

//force canvas to redraw
this.$c.width+=0;

return false;
};

Expand Down

0 comments on commit df7ed7e

Please sign in to comment.