Merge pull request #479 from Terny22/gauge-anim-issue

fixed minor animation issue in gauge-widgets
This commit is contained in:
Igor Kulikov 2017-12-13 20:16:18 +02:00 committed by GitHub
commit ab34473224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -104,10 +104,12 @@ export default class TbAnalogueCompass {
var tvPair = cellData.data[cellData.data.length - var tvPair = cellData.data[cellData.data.length -
1]; 1];
var value = tvPair[1]; var value = tvPair[1];
if(value !== this.gauge.value) {
this.gauge.value = value; this.gauge.value = value;
} }
} }
} }
}
mobileModeChanged() { mobileModeChanged() {
var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile; var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile;

View File

@ -212,10 +212,12 @@ export default class TbAnalogueLinearGauge {
var tvPair = cellData.data[cellData.data.length - var tvPair = cellData.data[cellData.data.length -
1]; 1];
var value = tvPair[1]; var value = tvPair[1];
if(value !== this.gauge.value) {
this.gauge.value = value; this.gauge.value = value;
} }
} }
} }
}
mobileModeChanged() { mobileModeChanged() {
var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile; var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile;

View File

@ -221,9 +221,11 @@ export default class TbAnalogueRadialGauge {
var tvPair = cellData.data[cellData.data.length - var tvPair = cellData.data[cellData.data.length -
1]; 1];
var value = tvPair[1]; var value = tvPair[1];
if(value !== this.gauge.value) {
this.gauge.value = value; this.gauge.value = value;
} }
} }
}
} }

View File

@ -204,10 +204,12 @@ export default class TbCanvasDigitalGauge {
this.gauge.options.label = timestampDisplayValue; this.gauge.options.label = timestampDisplayValue;
} }
var value = tvPair[1]; var value = tvPair[1];
if(value !== this.gauge.value) {
this.gauge.value = value; this.gauge.value = value;
} }
} }
} }
}
mobileModeChanged() { mobileModeChanged() {
var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile; var animation = this.ctx.settings.animation !== false && !this.ctx.isMobile;