Skip to content

Commit

Permalink
Logging removed for sorted directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Feb 22, 2019
1 parent b928300 commit e0d737b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Squidex/app/framework/angular/sorted.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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();
Expand All @@ -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];

Expand Down

0 comments on commit e0d737b

Please sign in to comment.