@leanix/components 0.3.30 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -729,10 +729,17 @@ class IconScaleComponent {
|
|
|
729
729
|
this.iconArray = [];
|
|
730
730
|
}
|
|
731
731
|
ngOnChanges(_changes) {
|
|
732
|
-
this.iconArray = this.createIconArray(this.numberOfColoredItems, this.numberOfItems);
|
|
732
|
+
this.iconArray = this.createIconArray(this.numberOfColoredItems, this.numberOfItems, this.icon?.reverse || false);
|
|
733
733
|
}
|
|
734
|
-
createIconArray(coloredItems, totalItems) {
|
|
735
|
-
return [...Array(totalItems).keys()].map((index) =>
|
|
734
|
+
createIconArray(coloredItems, totalItems, reverse) {
|
|
735
|
+
return [...Array(totalItems).keys()].map((index) => {
|
|
736
|
+
if (reverse) {
|
|
737
|
+
return index >= totalItems - coloredItems;
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
return index < coloredItems;
|
|
741
|
+
}
|
|
742
|
+
});
|
|
736
743
|
}
|
|
737
744
|
}
|
|
738
745
|
IconScaleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: IconScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|