Commit ab344732242ce17f6d7f0f45d3806f0ff98f45be
Committed by
GitHub
Merge pull request #479 from Terny22/gauge-anim-issue
fixed minor animation issue in gauge-widgets
Showing
4 changed files
with
12 additions
and
4 deletions
@@ -104,7 +104,9 @@ export default class TbAnalogueCompass { | @@ -104,7 +104,9 @@ export default class TbAnalogueCompass { | ||
104 | var tvPair = cellData.data[cellData.data.length - | 104 | var tvPair = cellData.data[cellData.data.length - |
105 | 1]; | 105 | 1]; |
106 | var value = tvPair[1]; | 106 | var value = tvPair[1]; |
107 | - this.gauge.value = value; | 107 | + if(value !== this.gauge.value) { |
108 | + this.gauge.value = value; | ||
109 | + } | ||
108 | } | 110 | } |
109 | } | 111 | } |
110 | } | 112 | } |
@@ -212,7 +212,9 @@ export default class TbAnalogueLinearGauge { | @@ -212,7 +212,9 @@ export default class TbAnalogueLinearGauge { | ||
212 | var tvPair = cellData.data[cellData.data.length - | 212 | var tvPair = cellData.data[cellData.data.length - |
213 | 1]; | 213 | 1]; |
214 | var value = tvPair[1]; | 214 | var value = tvPair[1]; |
215 | - this.gauge.value = value; | 215 | + if(value !== this.gauge.value) { |
216 | + this.gauge.value = value; | ||
217 | + } | ||
216 | } | 218 | } |
217 | } | 219 | } |
218 | } | 220 | } |
@@ -221,7 +221,9 @@ export default class TbAnalogueRadialGauge { | @@ -221,7 +221,9 @@ export default class TbAnalogueRadialGauge { | ||
221 | var tvPair = cellData.data[cellData.data.length - | 221 | var tvPair = cellData.data[cellData.data.length - |
222 | 1]; | 222 | 1]; |
223 | var value = tvPair[1]; | 223 | var value = tvPair[1]; |
224 | - this.gauge.value = value; | 224 | + if(value !== this.gauge.value) { |
225 | + this.gauge.value = value; | ||
226 | + } | ||
225 | } | 227 | } |
226 | } | 228 | } |
227 | 229 |
@@ -204,7 +204,9 @@ export default class TbCanvasDigitalGauge { | @@ -204,7 +204,9 @@ export default class TbCanvasDigitalGauge { | ||
204 | this.gauge.options.label = timestampDisplayValue; | 204 | this.gauge.options.label = timestampDisplayValue; |
205 | } | 205 | } |
206 | var value = tvPair[1]; | 206 | var value = tvPair[1]; |
207 | - this.gauge.value = value; | 207 | + if(value !== this.gauge.value) { |
208 | + this.gauge.value = value; | ||
209 | + } | ||
208 | } | 210 | } |
209 | } | 211 | } |
210 | } | 212 | } |