From db9e49b749212041c4f4b9902154f05ab593fb0a Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Wed, 13 Dec 2023 12:38:16 +0100
Subject: [PATCH] Rename property of Math table from lastHelperRowColor to
 helperRowColor

---
 docs/unit_definition_changelog.txt               |  4 ++--
 .../input-elements/math-table.component.ts       |  2 +-
 .../models/elements/input-elements/math-table.ts |  6 +++---
 .../models/elements/property-group-interfaces.ts |  2 +-
 .../element-style-properties.component.ts        | 16 ++++++++--------
 projects/editor/src/assets/i18n/de.json          |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/docs/unit_definition_changelog.txt b/docs/unit_definition_changelog.txt
index 17db697f9..16bcd4994 100644
--- a/docs/unit_definition_changelog.txt
+++ b/docs/unit_definition_changelog.txt
@@ -135,9 +135,9 @@ iqb-aspect-definition@1.0.0
 
 4.3.0
 - Geometry: new property: trackedVariables
-- new property in "OtherStyles": lastHelperRowColor
+- new property in "OtherStyles": helperRowColor
 - MathTable:
-  - new styling property: lastHelperRowColor
+  - new styling property: helperRowColor
   - new property value: operation: 'variable'
   - new property: variableLayoutOptions: {
                       allowArithmeticChars: boolean;
diff --git a/projects/common/components/input-elements/math-table.component.ts b/projects/common/components/input-elements/math-table.component.ts
index 07795eb96..f09233806 100644
--- a/projects/common/components/input-elements/math-table.component.ts
+++ b/projects/common/components/input-elements/math-table.component.ts
@@ -35,7 +35,7 @@ import { ValueChangeElement } from 'common/models/elements/element';
                                                                               elementModel.styling.fontSize * 2"
               [style.font-size]="row.cells.length && row.isHelperRow && '70%'"
               [style.background-color]="row.isHelperRow ?
-                                        elementModel.styling.lastHelperRowColor : 'transparent'">
+                                        elementModel.styling.helperRowColor : 'transparent'">
             <td *ngFor="let cell of row.cells" [attr.contenteditable]="cell.isEditable"
                 [style.width.px]="elementModel.styling.fontSize * 2"
                 [class.strike-through]="cell.isCrossedOut"
diff --git a/projects/common/models/elements/input-elements/math-table.ts b/projects/common/models/elements/input-elements/math-table.ts
index 89f3fee5c..d1edc96bc 100644
--- a/projects/common/models/elements/input-elements/math-table.ts
+++ b/projects/common/models/elements/input-elements/math-table.ts
@@ -30,7 +30,7 @@ export class MathTableElement extends UIElement implements MathTableProperties {
     };
 
   styling: BasicStyles & {
-    lastHelperRowColor: string;
+    helperRowColor: string;
   };
 
   constructor(element?: MathTableProperties) {
@@ -51,7 +51,7 @@ export class MathTableElement extends UIElement implements MathTableProperties {
       if (element?.variableLayoutOptions !== undefined) this.variableLayoutOptions = { ...element.variableLayoutOptions };
       this.styling = {
         ...PropertyGroupGenerators.generateBasicStyleProps(element?.styling),
-        lastHelperRowColor: 'transparent'
+        helperRowColor: 'transparent'
       };
     }
   }
@@ -97,7 +97,7 @@ export interface MathTableProperties extends UIElementProperties {
     allowFirstLineCrossOut: boolean;
   }
   styling: BasicStyles & {
-    lastHelperRowColor: string;
+    helperRowColor: string;
   };
 }
 
diff --git a/projects/common/models/elements/property-group-interfaces.ts b/projects/common/models/elements/property-group-interfaces.ts
index 7ff826726..01f10d200 100644
--- a/projects/common/models/elements/property-group-interfaces.ts
+++ b/projects/common/models/elements/property-group-interfaces.ts
@@ -59,7 +59,7 @@ export interface OtherStyles {
   firstLineColoring?: boolean;
   firstLineColoringColor?: string;
   selectionColor?: string;
-  lastHelperRowColor?: string;
+  helperRowColor?: string;
 }
 
 export interface PlayerProperties {
diff --git a/projects/editor/src/app/components/properties-panel/style-properties-tab/element-style-properties.component.ts b/projects/editor/src/app/components/properties-panel/style-properties-tab/element-style-properties.component.ts
index 57d571dc6..78f675970 100644
--- a/projects/editor/src/app/components/properties-panel/style-properties-tab/element-style-properties.component.ts
+++ b/projects/editor/src/app/components/properties-panel/style-properties-tab/element-style-properties.component.ts
@@ -6,19 +6,19 @@ import { Stylings } from 'common/models/elements/property-group-interfaces';
   selector: 'aspect-element-style-properties',
   template: `
     <div class="fx-column-start-stretch" *ngIf="styles">
-      <mat-form-field *ngIf="styles.lastHelperRowColor !== undefined"
+      <mat-form-field *ngIf="styles.helperRowColor !== undefined"
                       appearance="fill" class="mdInput textsingleline">
-        <mat-label>{{'propertiesPanel.lastHelperRowColor' | translate }}</mat-label>
-        <input matInput type="text" [value]="styles.lastHelperRowColor"
+        <mat-label>{{'propertiesPanel.helperRowColor' | translate }}</mat-label>
+        <input matInput type="text" [value]="styles.helperRowColor"
                (input)="unitService.updateSelectedElementsStyleProperty(
-                          'lastHelperRowColor', $any($event.target).value)">
-        <button mat-icon-button matSuffix (click)="lastHelperRowColorInput.click()">
+                          'helperRowColor', $any($event.target).value)">
+        <button mat-icon-button matSuffix (click)="helperRowColorInput.click()">
           <mat-icon>edit</mat-icon>
         </button>
       </mat-form-field>
-      <input matInput type="color" hidden #lastHelperRowColorInput
-             [value]="styles.lastHelperRowColor"
-             (input)="unitService.updateSelectedElementsStyleProperty('lastHelperRowColor', $any($event.target).value)">
+      <input matInput type="color" hidden #helperRowColorInput
+             [value]="styles.helperRowColor"
+             (input)="unitService.updateSelectedElementsStyleProperty('helperRowColor', $any($event.target).value)">
 
       <mat-checkbox *ngIf="styles.lineColoring !== undefined"
                     [checked]="$any(styles.lineColoring)"
diff --git a/projects/editor/src/assets/i18n/de.json b/projects/editor/src/assets/i18n/de.json
index d7518c3a8..195e0ae7f 100644
--- a/projects/editor/src/assets/i18n/de.json
+++ b/projects/editor/src/assets/i18n/de.json
@@ -251,7 +251,7 @@
     "tooltip": "Tooltip",
     "stickyHeader": "Haftende Kopfzeile",
     "crossOutChecked": "Auswahl durchstreichen",
-    "lastHelperRowColor": "Farbe unterer Hilfszeile",
+    "helperRowColor": "Farbe der Hilfszeile(n)",
     "allowArithmeticChars": "Rechen- und Gleichheitszeichen erlauben",
     "isFirstLineUnderlined": "Unterstreichung erste Zeile",
     "showResultRow": "Ergebniszeile",
-- 
GitLab