File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
projects/ng-sortgrid/src/lib/sort/reflection Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- import { Injectable } from '@angular/core' ;
1+ import { Injectable } from '@angular/core' ;
22
33import { NgsgElementsHelper } from '../../helpers/element/ngsg-elements.helper' ;
44import { NgsgDragelement } from '../../shared/ngsg-dragelement.model' ;
@@ -8,16 +8,15 @@ import {NgsgStoreService} from '../../store/ngsg-store.service';
88 providedIn : 'root'
99} )
1010export class NgsgReflectService {
11- constructor ( private ngsgStore : NgsgStoreService ) { }
11+ constructor ( private ngsgStore : NgsgStoreService ) {
12+ }
1213
1314 public reflectChanges ( key : string , element : Element ) : any [ ] {
1415 const items = this . ngsgStore . getItems ( key ) ;
1516 const selectedElements = this . ngsgStore . getSelectedItems ( key ) ;
1617 const selectedElementIndices = this . getSelectedElementsIndices ( selectedElements ) ;
1718 const selectedItems = this . getSelectedItems ( items , selectedElementIndices ) ;
18- const sortedIndices = selectedElementIndices . sort ( function ( a , b ) {
19- return a - b ;
20- } ) ;
19+ const sortedIndices = selectedElementIndices . sort ( ( a , b ) => a - b ) ;
2120 const dropIndex = this . findDropIndex ( selectedElements , element ) ;
2221
2322 while ( sortedIndices . length > 0 ) {
You can’t perform that action at this time.
0 commit comments