mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-19 23:06:09 +01:00
This commit is contained in:
parent
f19a18e961
commit
f9cc8e4065
1 changed files with 10 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ import {setPadding} from "../protyle/ui/initUI";
|
|||
import {setPosition} from "../util/setPosition";
|
||||
import {clearOBG} from "./dock/util";
|
||||
import {recordBeforeResizeTop} from "../protyle/util/resize";
|
||||
import {stopScrollAnimation} from "../boot/globalEvent/dragover";
|
||||
|
||||
export class Wnd {
|
||||
private app: App;
|
||||
|
|
@ -312,6 +313,11 @@ export class Wnd {
|
|||
}
|
||||
saveLayout();
|
||||
});
|
||||
this.headersElement.parentElement.addEventListener("dragenter", (event) => {
|
||||
if (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE)) {
|
||||
stopScrollAnimation();
|
||||
}
|
||||
});
|
||||
let elementDragCounter = 0;
|
||||
this.element.addEventListener("dragenter", (event: DragEvent & { target: HTMLElement }) => {
|
||||
elementDragCounter++;
|
||||
|
|
@ -335,7 +341,9 @@ export class Wnd {
|
|||
dragElement.removeAttribute("style");
|
||||
}
|
||||
});
|
||||
|
||||
dragElement.addEventListener("dragenter", () => {
|
||||
stopScrollAnimation();
|
||||
});
|
||||
dragElement.addEventListener("dragover", (event: DragEvent & { layerX: number, layerY: number }) => {
|
||||
document.querySelectorAll(".layout-tab-bars--drag").forEach(item => {
|
||||
item.classList.remove("layout-tab-bars--drag");
|
||||
|
|
@ -350,6 +358,7 @@ export class Wnd {
|
|||
dragElement.addEventListener("dragleave", () => {
|
||||
dragElement.classList.add("fn__none");
|
||||
dragElement.removeAttribute("style");
|
||||
stopScrollAnimation();
|
||||
});
|
||||
|
||||
dragElement.addEventListener("drop", (event: DragEvent & { target: HTMLElement }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue