#93 Fixed drag area style

This commit is contained in:
mauriziovitale84
2016-06-06 15:14:54 +01:00
parent 09d02a86d2
commit 503217a9c9
2 changed files with 13 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "ng2-alfresco-upload",
"description": "Alfresco Angular2 Upload Component",
"version": "0.1.32",
"version": "0.1.33",
"author": "Alfresco Software, Ltd.",
"scripts": {
"typings": "typings install",

View File

@@ -34,7 +34,7 @@ import { Directive, ElementRef, EventEmitter, Output } from 'angular2/core';
'(drop)': '_onDropFiles($event)',
'(dragenter)': '_onDragEnter($event)',
'(dragleave)': '_onDragLeave($event)',
'(dragover)': '_preventDefault($event)',
'(dragover)': '_onDragOver($event)',
'[class.input-focus]': '_inputFocusClass'
}
})
@@ -118,6 +118,17 @@ export class FileDraggableDirective {
this._inputFocusClass = false;
}
/**
* Change the style of the drag area when a file is over the drag area.
*
* @param $event
* @private
*/
_onDragOver($event: Event): void {
this._preventDefault($event);
this._inputFocusClass = true;
}
/**
* Prevent default and stop propagation of the DOM event.
*