Skip to content
Snippets Groups Projects
Commit 4cad7980 authored by Tom Frederik Leimbrock's avatar Tom Frederik Leimbrock
Browse files

load the font style correctly

This commit ensures that when you open the tag
cloud settings, the bold and italic font sliders
are enabled according to the actual setting.

Closes #114
parent fbd70243
No related merge requests found
...@@ -81,9 +81,9 @@ ...@@ -81,9 +81,9 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="input-row special-settings automatic-spelling" fxLayout="row" fxLayoutGap="5px" fxLayout.xs="column"> <div class="input-row special-settings automatic-spelling" fxLayout="row" fxLayoutGap="5px" fxLayout.xs="column">
<mat-radio-group matTooltip="{{'tag-cloud-config.notation-tooltip' | translate}}" aria-label="Notation:"> <mat-radio-group matTooltip="{{'tag-cloud-config.notation-tooltip' | translate}}" aria-label="Notation:">
<div><mat-slide-toggle value="italic" (change)="italicChecked($event)"[ngModelOptions]="{standalone: true}">{{'tag-cloud-config.font-style-italic' | translate}}</mat-slide-toggle> </div> <div><mat-slide-toggle [checked]="checkItalic()" (change)="italicChecked($event)"[ngModelOptions]="{standalone: true}">{{'tag-cloud-config.font-style-italic' | translate}}</mat-slide-toggle> </div>
<div><mat-slide-toggle value="bold" (change)="boldChecked($event)" [ngModelOptions]="{standalone: true}">{{'tag-cloud-config.font-style-bold' | translate}}</mat-slide-toggle> </div> <div><mat-slide-toggle [checked]="checkBold()" (change)="boldChecked($event)" [ngModelOptions]="{standalone: true}">{{'tag-cloud-config.font-style-bold' | translate}}</mat-slide-toggle> </div>
</mat-radio-group> </mat-radio-group>
</div> </div>
<div class="input-row" fxLayout="column" fxLayoutGap="5px"> <div class="input-row" fxLayout="column" fxLayoutGap="5px">
......
...@@ -157,7 +157,7 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -157,7 +157,7 @@ export class CloudConfigurationComponent implements OnInit {
this.parent.tagCloudDataManager.demoActive = false; this.parent.tagCloudDataManager.demoActive = false;
this.parent.setCloudParameters(this.cloudParameters); this.parent.setCloudParameters(this.cloudParameters);
this.parent.configurationOpen = false; this.parent.configurationOpen = false;
this.setStep(0) this.setStep(0);
} }
...@@ -207,4 +207,12 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -207,4 +207,12 @@ export class CloudConfigurationComponent implements OnInit {
event.checked == true ? this.cloudParameters.fontWeight = "bold" : this.cloudParameters.fontWeight = "normal"; event.checked == true ? this.cloudParameters.fontWeight = "bold" : this.cloudParameters.fontWeight = "normal";
this.valueChanged(); this.valueChanged();
} }
checkItalic() {
return this.cloudParameters.fontStyle === 'italic';
}
checkBold() {
return this.cloudParameters.fontWeight === 'bold';
}
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment