Merge remote-tracking branch 'origin/master' into new-state-concept
This commit is contained in:
commit
8bf1843675
@ -5,7 +5,6 @@ import { ComponentPortal } from '@angular/cdk/portal';
|
||||
|
||||
@Injectable()
|
||||
export class FileDropOverlayService {
|
||||
private _mouseIn = false;
|
||||
private readonly _dropOverlayRef: OverlayRef;
|
||||
|
||||
constructor(private readonly _overlay: Overlay, private readonly _injector: Injector) {
|
||||
@ -15,26 +14,18 @@ export class FileDropOverlayService {
|
||||
});
|
||||
}
|
||||
|
||||
dragListener = e => {
|
||||
dragEnter = e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (this._mouseIn) {
|
||||
this.openFileDropOverlay();
|
||||
}
|
||||
this.openFileDropOverlay();
|
||||
return false;
|
||||
};
|
||||
mouseIn = e => {
|
||||
|
||||
dragLeave = e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this._mouseIn = true;
|
||||
return false;
|
||||
};
|
||||
mouseOut = e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (e.toElement == null && e.relatedTarget == null) {
|
||||
if (e.relatedTarget == null) {
|
||||
setTimeout(() => {
|
||||
this._mouseIn = false;
|
||||
this.closeFileDropOverlay();
|
||||
}, 250);
|
||||
}
|
||||
@ -42,15 +33,13 @@ export class FileDropOverlayService {
|
||||
};
|
||||
|
||||
initFileDropHandling() {
|
||||
document.getElementsByTagName('body')[0].addEventListener('dragenter', this.dragListener, false);
|
||||
document.getElementsByTagName('body')[0].addEventListener('mouseenter', this.mouseIn, false);
|
||||
document.getElementsByTagName('body')[0].addEventListener('mouseout', this.mouseOut, false);
|
||||
document.getElementsByTagName('body')[0].addEventListener('dragenter', this.dragEnter, false);
|
||||
document.getElementsByTagName('body')[0].addEventListener('dragleave', this.dragLeave, false);
|
||||
}
|
||||
|
||||
cleanupFileDropHandling() {
|
||||
document.getElementsByTagName('body')[0].removeEventListener('dragenter', this.dragListener, false);
|
||||
document.getElementsByTagName('body')[0].removeEventListener('mouseenter', this.mouseIn, false);
|
||||
document.getElementsByTagName('body')[0].removeEventListener('mouseout', this.mouseOut, false);
|
||||
document.getElementsByTagName('body')[0].removeEventListener('dragenter', this.dragEnter, false);
|
||||
document.getElementsByTagName('body')[0].removeEventListener('dragleave', this.dragLeave, false);
|
||||
}
|
||||
|
||||
openFileDropOverlay() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "redaction",
|
||||
"version": "2.248.0",
|
||||
"version": "2.250.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
}
|
||||
|
||||
main article {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@ -14,8 +14,7 @@
|
||||
}
|
||||
|
||||
.portal-search-result {
|
||||
padding: 0;
|
||||
margin-top: 80px;
|
||||
padding: 80px 0 0 0;
|
||||
}
|
||||
|
||||
ul.searchresults {
|
||||
|
||||
Binary file not shown.
@ -258,8 +258,7 @@
|
||||
}
|
||||
|
||||
.portal-search-result {
|
||||
padding: 0;
|
||||
margin-top: 80px;
|
||||
padding: 80px 0 0 0;
|
||||
}
|
||||
|
||||
ul.searchresults {
|
||||
@ -454,7 +453,6 @@ li.searchresultitem {
|
||||
}
|
||||
|
||||
main article {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user