Make reverse non destructive
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-10-31 13:43:31 +01:00
parent 61636b6e3d
commit 56a7544c1e
4 changed files with 4 additions and 4 deletions

View File

@ -17,6 +17,7 @@ import { Observable } from 'rxjs';
export class FeatureListContainerComponent {
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[],private packageService:PackageService ) {
this.featureLists = [...this.featureLists].reverse();
}
@Input() features: Array<Feature>
@ -32,7 +33,6 @@ export class FeatureListContainerComponent {
let selected = -1;
let maxMatches =0;
let showItem = true;
this.featureLists.reverse();
for (let i = 0; i < this.featureLists.length; i++) {
let matches=0;
let criteria=0;

View File

@ -15,6 +15,7 @@ import { WidgetHostDirective } from '../widget-host/widget-host.directive';
export class FeatureListFeatureContainerComponent {
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListFeatureComponent) public featureLists: AbstractFeatureListFeatureComponent[] ) {
this.featureLists = [...this.featureLists].reverse();
}
@Input() feature: Feature;
@ -26,7 +27,6 @@ export class FeatureListFeatureContainerComponent {
let selected = -1;
let maxMatches =0;
this.featureLists.reverse();
for (let i = 0; i < this.featureLists.length; i++) {
let matches=0;
let criteria=0;

View File

@ -15,6 +15,7 @@ import { IItem, IListItem } from '@farmmaps/common';
export class ItemListItemContainerComponent {
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractItemListItemComponent) public itemComponentList: AbstractItemListItemComponent[] ) {
this.itemComponentList = [...this.itemComponentList].reverse();
}
@Input() item: IListItem;
@ -27,7 +28,6 @@ export class ItemListItemContainerComponent {
let selected = -1;
let maxMatches =0;
let showItem = true;
this.itemComponentList.reverse();
for (let i = 0; i < this.itemComponentList.length; i++) {
let matches=0;
let criteria=0;

View File

@ -13,6 +13,7 @@ import { IItemLayer } from '../../models/item.layer';
export class SelectedItemContainerComponent {
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractSelectedItemComponent) public selectedItemComponents: AbstractSelectedItemComponent[] ) {
this.selectedItemComponents = [...this.selectedItemComponents].reverse();
}
@Input() item: IItem;
@ -28,7 +29,6 @@ export class SelectedItemContainerComponent {
let selected = -1;
let maxMatches =0;
let showItem = true;
this.selectedItemComponents.reverse();
for (let i = 0; i < this.selectedItemComponents.length; i++) {
let matches=0;
let criteria=0;