Browse Source

Logging removed for sorted directive.

pull/348/head v1.16.0
Sebastian Stehle 7 years ago
parent
commit
e0d737b42b
  1. 12
      src/Squidex/app/framework/angular/sorted.directive.ts

12
src/Squidex/app/framework/angular/sorted.directive.ts

@ -5,14 +5,14 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Directive, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
import { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import * as Sortable from 'sortablejs';
@Directive({
selector: '[sqxSortModel]'
})
export class SortedDirective implements OnDestroy, OnInit, OnChanges {
export class SortedDirective implements OnDestroy, OnInit {
private sortable: Sortable.Ref;
@Input()
@ -29,13 +29,6 @@ export class SortedDirective implements OnDestroy, OnInit, OnChanges {
) {
}
public ngOnChanges(changes: SimpleChanges) {
const sortModel = changes['sortModel'].currentValue;
if (sortModel) {
console.log(JSON.stringify(sortModel.map((x: any) => x.fileName)));
}
}
public ngOnDestroy() {
if (this.sortable) {
this.sortable.destroy();
@ -48,7 +41,6 @@ export class SortedDirective implements OnDestroy, OnInit, OnChanges {
animation: 150,
onSort: (event: { oldIndex: number, newIndex: number }) => {
console.log('FOO');
if (this.sortModel && event.newIndex !== event.oldIndex) {
const newModel = [...this.sortModel];

Loading…
Cancel
Save