mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#93 Fixed drag area style
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ng2-alfresco-upload",
|
"name": "ng2-alfresco-upload",
|
||||||
"description": "Alfresco Angular2 Upload Component",
|
"description": "Alfresco Angular2 Upload Component",
|
||||||
"version": "0.1.32",
|
"version": "0.1.33",
|
||||||
"author": "Alfresco Software, Ltd.",
|
"author": "Alfresco Software, Ltd.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typings": "typings install",
|
"typings": "typings install",
|
||||||
|
@@ -34,7 +34,7 @@ import { Directive, ElementRef, EventEmitter, Output } from 'angular2/core';
|
|||||||
'(drop)': '_onDropFiles($event)',
|
'(drop)': '_onDropFiles($event)',
|
||||||
'(dragenter)': '_onDragEnter($event)',
|
'(dragenter)': '_onDragEnter($event)',
|
||||||
'(dragleave)': '_onDragLeave($event)',
|
'(dragleave)': '_onDragLeave($event)',
|
||||||
'(dragover)': '_preventDefault($event)',
|
'(dragover)': '_onDragOver($event)',
|
||||||
'[class.input-focus]': '_inputFocusClass'
|
'[class.input-focus]': '_inputFocusClass'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -118,6 +118,17 @@ export class FileDraggableDirective {
|
|||||||
this._inputFocusClass = false;
|
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.
|
* Prevent default and stop propagation of the DOM event.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user