Skip to content

Commit

Permalink
fixed set boolean value of switch control #976
Browse files Browse the repository at this point in the history
  • Loading branch information
unocelli committed Nov 25, 2023
1 parent 6bc1d88 commit 526ade1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ export class HtmlSwitchComponent {
} else {
value = parseFloat(value.toFixed(5));
}
value = GaugeBaseComponent.checkBitmaskAndValue((<GaugeProperty>ga.property).bitmask,
value,
(<GaugeProperty>ga.property).options.offValue,
(<GaugeProperty>ga.property).options.onValue);
if (typeof sig.value !== 'boolean') {
value = GaugeBaseComponent.checkBitmaskAndValue((<GaugeProperty>ga.property).bitmask,
value,
(<GaugeProperty>ga.property).options.offValue,
(<GaugeProperty>ga.property).options.onValue);
}
switcher.setValue(value);
}
} catch (err) {
Expand Down

0 comments on commit 526ade1

Please sign in to comment.