UI: string autocomplete style addition and liquid level widget minor improvement
This commit is contained in:
parent
7f0d6ebc3c
commit
c9e684ef64
@ -192,7 +192,7 @@ export class LiquidLevelWidgetComponent implements OnInit {
|
||||
if (isDefinedAndNotNull(data) && data.length && typeof Number(data[1]) === 'number') {
|
||||
const percentage = this.convertInputData(Number(data[1]));
|
||||
this.updateSvg(percentage);
|
||||
this.updateValueElement(this.convertOutputData(percentage));
|
||||
this.updateValueElement(this.convertOutputData(percentage), percentage);
|
||||
|
||||
if (this.settings.showTooltip) {
|
||||
this.updateTooltip(data);
|
||||
@ -382,7 +382,7 @@ export class LiquidLevelWidgetComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
private updateValueElement(data: number): void {
|
||||
private updateValueElement(data: number, percentage: number): void {
|
||||
let content: string;
|
||||
let container: JQuery<HTMLElement>;
|
||||
|
||||
@ -390,13 +390,13 @@ export class LiquidLevelWidgetComponent implements OnInit {
|
||||
.toFixed(this.settings.decimals || 0);
|
||||
const valueTextStyle = cssTextFromInlineStyle({...inlineTextStyle(this.settings.valueFont),
|
||||
color: this.valueColor.color});
|
||||
this.backgroundOverlayColor.update(data);
|
||||
this.backgroundOverlayColor.update(percentage);
|
||||
if (this.overlayContainer) {
|
||||
this.overlayContainer.attr('fill', this.backgroundOverlayColor.color);
|
||||
}
|
||||
|
||||
if (this.settings.layout === LevelCardLayout.absolute) {
|
||||
this.volumeColor.update(data);
|
||||
this.volumeColor.update(percentage);
|
||||
|
||||
const volumeInLiters: number = convertLiters(this.volume, this.settings.volumeUnits as CapacityUnits, ConversionType.to);
|
||||
const volume = convertLiters(volumeInLiters, this.widgetUnits as CapacityUnits, ConversionType.from)
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
:host {
|
||||
mat-form-field {
|
||||
display: flex;
|
||||
flex: 1 1 0%;
|
||||
max-width: 100%;
|
||||
@ -22,11 +23,13 @@
|
||||
.tb-autocomplete.tb-option-input-autocomplete {
|
||||
.mat-mdc-option {
|
||||
border-bottom: none;
|
||||
|
||||
.mdc-list-item__primary-text {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 8px;
|
||||
|
||||
.tb-option {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
@ -37,3 +40,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user