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:
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user