Skip to content

Commit

Permalink
chore: 🤖 (sort) fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nivekcode committed Nov 24, 2021
1 parent f9dfc3d commit 4be70c8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable } from '@angular/core';
import {Injectable} from '@angular/core';

import {NgsgElementsHelper} from '../../helpers/element/ngsg-elements.helper';
import {NgsgDragelement} from '../../shared/ngsg-dragelement.model';
Expand All @@ -8,16 +8,15 @@ import {NgsgStoreService} from '../../store/ngsg-store.service';
providedIn: 'root'
})
export class NgsgReflectService {
constructor(private ngsgStore: NgsgStoreService) {}
constructor(private ngsgStore: NgsgStoreService) {
}

public reflectChanges(key: string, element: Element): any[] {
const items = this.ngsgStore.getItems(key);
const selectedElements = this.ngsgStore.getSelectedItems(key);
const selectedElementIndices = this.getSelectedElementsIndices(selectedElements);
const selectedItems = this.getSelectedItems(items, selectedElementIndices);
const sortedIndices = selectedElementIndices.sort(function(a,b) {
return a - b;
});
const sortedIndices = selectedElementIndices.sort((a, b) => a - b);
const dropIndex = this.findDropIndex(selectedElements, element);

while (sortedIndices.length > 0) {
Expand Down

0 comments on commit 4be70c8

Please sign in to comment.