Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/directives/ng-file-drop.ts
  • Loading branch information
BenevidesLecontes committed Apr 8, 2017
2 parents 34ee54c + ede724f commit 24fe9f7
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/directives/ng-file-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
OnInit,
SimpleChange
} from '@angular/core';
import { NgUploaderService } from '../services/ngx-uploader';
import { NgUploaderOptions, UploadedFile, UploadRejected } from '../classes/index';
import {NgUploaderService} from '../services/ngx-uploader';
import {NgUploaderOptions, UploadedFile, UploadRejected} from '../classes/index';

@Directive({
selector: '[ngFileDrop]',
Expand All @@ -30,9 +30,9 @@ export class NgFileDropDirective implements OnChanges, OnInit {

files: File[] = [];

constructor(
@Inject(ElementRef) public el: ElementRef,
@Inject(NgUploaderService) public uploader: NgUploaderService) { }
constructor(@Inject(ElementRef) public el: ElementRef,
@Inject(NgUploaderService) public uploader: NgUploaderService) {
}

ngOnInit() {
this.uploader._emitter.subscribe((data: any) => {
Expand Down Expand Up @@ -63,7 +63,7 @@ export class NgFileDropDirective implements OnChanges, OnInit {
this.initEvents();
}

ngOnChanges(changes: {[propName: string]: SimpleChange}) {
ngOnChanges(changes: { [propName: string]: SimpleChange }) {
if (!this.options || !changes) {
return;
}
Expand Down Expand Up @@ -100,7 +100,7 @@ export class NgFileDropDirective implements OnChanges, OnInit {
}

let ext = f.name.split('.').pop();
if (ext && allowedExtensions.indexOf(ext.toLowerCase()) !== -1 ) {
if (ext && allowedExtensions.indexOf(ext.toLowerCase()) !== -1) {
return true;
}

Expand Down Expand Up @@ -133,13 +133,17 @@ export class NgFileDropDirective implements OnChanges, OnInit {

@HostListener('dragover', ['$event'])
public onDragOver(e: any) {
if (!e) { return; }
if (!e) {
return;
}
this.onFileOver.emit(true);
}

@HostListener('dragleave', ['$event'])
public onDragLeave(e: any) {
if (!e) { return; }
if (!e) {
return;
}
this.onFileOver.emit(false);
}

Expand Down

0 comments on commit 24fe9f7

Please sign in to comment.