mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
6b2ac5e630
commit
ffd6459540
2 changed files with 3 additions and 9 deletions
|
|
@ -482,14 +482,7 @@ export abstract class Constants {
|
||||||
"size": "auto",
|
"size": "auto",
|
||||||
"type": "center",
|
"type": "center",
|
||||||
"instance": "Layout",
|
"instance": "Layout",
|
||||||
"children": [{
|
"children": [{"instance": "Wnd", "children": [{"instance": "Tab", "children": []}]}]
|
||||||
"instance": "Wnd",
|
|
||||||
"children": [],
|
|
||||||
// "children": [{
|
|
||||||
// "instance": "Tab",
|
|
||||||
// "children": []
|
|
||||||
// }]
|
|
||||||
}]
|
|
||||||
}, {
|
}, {
|
||||||
"direction": "tb",
|
"direction": "tb",
|
||||||
"size": "0px",
|
"size": "0px",
|
||||||
|
|
|
||||||
|
|
@ -1056,9 +1056,10 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
let dragoverElement: Element;
|
let dragoverElement: Element;
|
||||||
let disabledPosition: string;
|
let disabledPosition: string;
|
||||||
editorElement.addEventListener("dragover", (event: DragEvent & { target: HTMLElement }) => {
|
editorElement.addEventListener("dragover", (event: DragEvent & { target: HTMLElement }) => {
|
||||||
if (protyle.disabled) {
|
if (protyle.disabled || event.dataTransfer.types.includes(Constants.SIYUAN_DROP_EDITOR)) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
event.dataTransfer.dropEffect = "none";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const contentRect = protyle.contentElement.getBoundingClientRect();
|
const contentRect = protyle.contentElement.getBoundingClientRect();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue