Skip to content
Snippets Groups Projects
Commit d3857335 authored by rhenck's avatar rhenck
Browse files

Fix TogleButton strike-through to only appear after it has a value

i.e. something has been clicked.
Since the value is not used on the player, we also need to check the 
FormControl value.

#335
parent e1b7e00f
No related branches found
No related tags found
No related merge requests found
Pipeline #40870 failed
......@@ -17,8 +17,12 @@ import { ToggleButtonElement } from 'common/models/elements/compound-elements/cl
(focusout)="elementFormControl.markAsTouched()">
<mat-button-toggle *ngFor="let option of elementModel.options; let i = index"
[value]="i"
[ngClass]="{ 'strike-other-options' : elementModel.strikeOtherOptions,
'strike-selected-option' : elementModel.strikeSelectedOption }"
[ngClass]="{ 'strike-other-options' : (this.elementFormControl.value !== null ||
elementModel.value !== null) &&
elementModel.strikeOtherOptions,
'strike-selected-option' : (this.elementFormControl.value !== null ||
elementModel.value !== null) &&
elementModel.strikeSelectedOption }"
[style.color]="elementModel.styling.fontColor"
[style.font-size.px]="elementModel.styling.fontSize"
[style.font-weight]="elementModel.styling.bold ? 'bold' : ''"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment