diff --git a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.html b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.html index 0a11a0443c2159014f30768fb8f5e03f7b39e403..132d5a561bc5195c348c270ba7221de36b5305c3 100644 --- a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.html +++ b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.html @@ -168,7 +168,12 @@ <div fxFlex="35px" class="color-box" [style.background]="weightClass.tagColor"></div> </div> </div> - <div class="input-row" fxLayout="column" fxLayoutGap="5px" *ngIf="weightClass.actualTagNumber > 0 && !parent.dataManager.demoActive"> + <div class="input-row firstElementOfWeightClass" fxLayout="row" fxLayoutGap="5px" fxLayout.xs="column" *ngIf="weightClass.actualTagNumber > 0 && !parent.dataManager.demoActive"> + <mat-slide-toggle matTooltip="{{'tag-cloud-config.manual-weight-number-tooltip' | translate}}" (change)="valueChanged()" fxFlex [(ngModel)]=" weightClass.allowManualTagNumber" + [ngModelOptions]="{standalone: true}">{{'tag-cloud-config.manual-weight-number' | translate}}</mat-slide-toggle> + <mat-icon matTooltip="{{'tag-cloud-config.manual-weight-number-note' | translate}}">help</mat-icon> + </div> + <div class="input-row" fxLayout="column" fxLayoutGap="5px" *ngIf="weightClass.actualTagNumber > 0 && !parent.dataManager.demoActive && weightClass.allowManualTagNumber"> <div class="input-row" fxLayout="column" fxLayoutGap="5px"> <mat-label class="label-text" >{{'tag-cloud-config.weight-number' | translate}}</mat-label> <mat-slider [value]="weightClass.maxTagNumber" min="1" [max]="weightClass.actualTagNumber" step="1" diff --git a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss index 316554c43c41f8a50bf3dc935d5f750de04c0977..fbb071b522f88588229215cafa4a90492bce9f14 100644 --- a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss +++ b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss @@ -237,6 +237,10 @@ mat-divider { border-top: 2px solid var(--primary); padding-top: 10px; } +.firstElementOfWeightClass{ + margin-top: 10px; + padding-bottom: 10px; +} .automatic-spelling{ padding-bottom: 30px; } diff --git a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.ts b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.ts index c0a1b088da912496577294a6ab81faf240427c60..bdd01fdb63e02fac4d34526d011f34d07c723f8f 100644 --- a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.ts +++ b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.ts @@ -32,61 +32,71 @@ export class CloudConfigurationComponent implements OnInit { maxTagNumber: 20, tagColor: '#8800ff', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 20, tagColor: '#ff00ff', actualTagNumber: 5, rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 17, tagColor: '#ffea00', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 15, tagColor: '#00CC99', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 12, tagColor: '#00CC66', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 10, tagColor: '#0033FF', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 8, tagColor: '#CC0099', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 7, tagColor: '#FF3399', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 6, tagColor: '#FFFF00', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, { maxTagNumber: 5, tagColor: '#FF0000', actualTagNumber: 5, - rotationAngle: 0 + rotationAngle: 0, + allowManualTagNumber: false }, ]; MinFont:number; @@ -135,12 +145,18 @@ export class CloudConfigurationComponent implements OnInit { this.weightClasses[i].actualTagNumber = this.countPerWeight[i]; this.weightClasses[i].rotationAngle = element.rotation; this.weightClasses[i].maxTagNumber = (element.maxVisibleElements == -1 || element.maxVisibleElements == 0) ? this.weightClasses[i].actualTagNumber : element.maxVisibleElements; + this.weightClasses[i].allowManualTagNumber = element.allowManualTagNumber; }); } parseJsonToArrayWeightClasses() { this.weightClasses.forEach((element, i) => { - this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = element.maxTagNumber == 0 ? -1 : element.maxTagNumber; + this.cloudParameters.cloudWeightSettings[i].allowManualTagNumber = element.allowManualTagNumber; + if(element.allowManualTagNumber == true){ + this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = element.maxTagNumber == 0 ? -1 : element.maxTagNumber; + }else{ + this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = -1; + } this.cloudParameters.cloudWeightSettings[i].color = element.tagColor; this.cloudParameters.cloudWeightSettings[i].rotation = element.rotationAngle; }); diff --git a/src/app/components/shared/_dialogs/cloud-configuration/weight-class.interface.ts b/src/app/components/shared/_dialogs/cloud-configuration/weight-class.interface.ts index 237959840512a99f0a5880fc6f98bfb51d58dcdc..6cf05143bfd5c2253e2325bc56c0fc6ca830f92f 100644 --- a/src/app/components/shared/_dialogs/cloud-configuration/weight-class.interface.ts +++ b/src/app/components/shared/_dialogs/cloud-configuration/weight-class.interface.ts @@ -3,4 +3,5 @@ export interface WeightClass { tagColor: string; actualTagNumber: number; rotationAngle: number; + allowManualTagNumber: boolean; } diff --git a/src/app/components/shared/tag-cloud/tag-cloud.component.ts b/src/app/components/shared/tag-cloud/tag-cloud.component.ts index 2e4c2dfe0ebf51f0a8206322598a0b8ebff9a7ab..6f77a89b4bc43a443890e92311aa1dd018d983da 100644 --- a/src/app/components/shared/tag-cloud/tag-cloud.component.ts +++ b/src/app/components/shared/tag-cloud/tag-cloud.component.ts @@ -113,16 +113,16 @@ const getResolvedDefaultColors = (): string[] => { const getDefaultCloudParameters = (): CloudParameters => { const resDefaultColors = getResolvedDefaultColors(); const weightSettings: CloudWeightSettings = [ - {maxVisibleElements: -1, color: resDefaultColors[1], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[2], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[3], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[4], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[5], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[6], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[7], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[8], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[9], rotation: 0}, - {maxVisibleElements: -1, color: resDefaultColors[10], rotation: 0}, + {maxVisibleElements: -1, color: resDefaultColors[1], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[2], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[3], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[4], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[5], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[6], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[7], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[8], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[9], rotation: 0, allowManualTagNumber: false}, + {maxVisibleElements: -1, color: resDefaultColors[10], rotation: 0, allowManualTagNumber: false}, ]; return { fontFamily: 'Dancing Script', diff --git a/src/app/components/shared/tag-cloud/tag-cloud.interface.ts b/src/app/components/shared/tag-cloud/tag-cloud.interface.ts index 240eb3b0b6eade4a3b802b0b482c091fec322e10..5ede58cb1f5fcddb5060eaae9b36aab6ab2bbdb1 100644 --- a/src/app/components/shared/tag-cloud/tag-cloud.interface.ts +++ b/src/app/components/shared/tag-cloud/tag-cloud.interface.ts @@ -15,6 +15,7 @@ export interface CloudWeightSetting { * null indicates random rotation. */ rotation: number; + allowManualTagNumber: boolean; } export type CloudWeightSettings = [ diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index b37128502f219c238b9a68f4a6b6a58a398aff03..7302637120895daadee9753e05e5013693e2d318 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -499,6 +499,9 @@ "font-family-tooltip": "Schriftart auswählen", "bold-notation-tooltip": "Schrift fett setzen", "font-style-bold" : "Fett", - "font-family":"Schriftart" + "font-family":"Schriftart", + "manual-weight-number": "Anzahl festlegen", + "manual-weight-number-tooltip": "Limitierung der Relevanz-Gruppe", + "manual-weight-number-note": "Limitiert die jeweilige Relevanz-Gruppe auf einen selbst festgelegten Wert" } } diff --git a/src/assets/i18n/creator/en.json b/src/assets/i18n/creator/en.json index cd1ac29e3006ad899594025764fc315de58d50cd..cbf7e86d66677e9b96faedff016e3c225b3dfe8d 100644 --- a/src/assets/i18n/creator/en.json +++ b/src/assets/i18n/creator/en.json @@ -499,6 +499,9 @@ "bold-notation-tooltip": "Select font-thickness bold", "font-style-bold" : "Bold", "font-style-italic": "Italic", - "font-family":"Font Family" + "font-family":"Font Family", + "manual-weight-number": "Set quantity", + "manual-weight-number-tooltip": "Quantity Limitation of this weight class", + "manual-weight-number-note": "Limits the respective weight class to a self-defined value" } } diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index f93a0d4001795f02b900f4422c6b732ff969201c..ef8cb654685445ec6d7b16c21c076c0bb75c176a 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -367,6 +367,9 @@ "font-family-tooltip": "Schrift auswählen", "bold-notation-tooltip": "Schrift fett setzen", "font-style-bold" : "Fett", - "font-family":"Schriftart" + "font-family":"Schriftart", + "manual-weight-number": "Anzahl festlegen", + "manual-weight-number-tooltip": "Limitierung der Relevanz-Gruppe", + "manual-weight-number-note": "Limitiert die jeweilige Relevanz-Gruppe auf einen selbst festgelegten Wert" } } diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index 8efe1c76fadec2ccd994422af3658ad6f3489074..dbc6ad3a170b10bda5fcaaf69e1f215837214e7e 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -374,6 +374,9 @@ "bold-notation-tooltip": "Select font-thickness bold", "font-style-bold" : "Bold", "font-style-italic": "Italic", - "font-family":"Font Family" + "font-family":"Font Family", + "manual-weight-number": "Set quantity", + "manual-weight-number-tooltip": "Quantity Limitation of this weight class", + "manual-weight-number-note": "Limits the respective weight class to a self-defined Quantity" } }