mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
345be890f6
commit
378b552069
9 changed files with 12 additions and 12 deletions
|
@ -416,7 +416,7 @@ export const showPopover = async (app: App, showRef = false) => {
|
|||
}
|
||||
});
|
||||
if (!hasPin && popoverTargetElement.parentElement &&
|
||||
popoverTargetElement.parentElement.style.opacity !== "0.1" // 反向面板图标拖拽时不应该弹层
|
||||
popoverTargetElement.parentElement.style.opacity !== "0.38" // 反向面板图标拖拽时不应该弹层
|
||||
) {
|
||||
window.siyuan.blockPanels.push(new BlockPanel({
|
||||
app,
|
||||
|
|
|
@ -50,7 +50,7 @@ export class Tab {
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
const dragElement = Array.from(this.headElement.parentElement.childNodes).find((item: HTMLElement) => {
|
||||
if (item.style?.opacity === "0.1") {
|
||||
if (item.style?.opacity === "0.38") {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
@ -96,7 +96,7 @@ export class Tab {
|
|||
layoutToJSON(this, modeJSON);
|
||||
event.dataTransfer.setData(Constants.SIYUAN_DROP_TAB, JSON.stringify(modeJSON));
|
||||
event.dataTransfer.dropEffect = "move";
|
||||
tabElement.style.opacity = "0.1";
|
||||
tabElement.style.opacity = "0.38";
|
||||
window.siyuan.dragElement = this.headElement;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -191,7 +191,7 @@ export class Wnd {
|
|||
let oldTabHeaderElement = window.siyuan.dragElement;
|
||||
let exitDrag = false;
|
||||
Array.from(it.firstElementChild.childNodes).find((item: HTMLElement) => {
|
||||
if (item.style?.opacity === "0.1") {
|
||||
if (item.style?.opacity === "0.38") {
|
||||
oldTabHeaderElement = item;
|
||||
exitDrag = true;
|
||||
return true;
|
||||
|
@ -207,7 +207,7 @@ export class Wnd {
|
|||
return;
|
||||
} else if (!exitDrag && !oldTabHeaderElement) { // 拖拽到新窗口
|
||||
oldTabHeaderElement = document.createElement("li");
|
||||
oldTabHeaderElement.style.opacity = "0.1";
|
||||
oldTabHeaderElement.style.opacity = "0.38";
|
||||
oldTabHeaderElement.innerHTML = '<svg class="svg"><use xlink:href="#iconFile"></use></svg>';
|
||||
oldTabHeaderElement.setAttribute("data-clone", "true");
|
||||
it.firstElementChild.append(oldTabHeaderElement);
|
||||
|
@ -274,7 +274,7 @@ export class Wnd {
|
|||
}
|
||||
|
||||
const nextTabHeaderElement = (Array.from(it.firstElementChild.childNodes).find((item: HTMLElement) => {
|
||||
if (item.style?.opacity === "0.1") {
|
||||
if (item.style?.opacity === "0.38") {
|
||||
return true;
|
||||
}
|
||||
}) as HTMLElement)?.nextElementSibling;
|
||||
|
|
|
@ -435,7 +435,7 @@ export class Files extends Model {
|
|||
const ghostElement = document.createElement("ul");
|
||||
selectElements.forEach((item: HTMLElement, index) => {
|
||||
ghostElement.append(item.cloneNode(true));
|
||||
item.style.opacity = "0.1";
|
||||
item.style.opacity = "0.38";
|
||||
const itemNodeId = item.dataset.nodeId ||
|
||||
item.dataset.path; // 拖拽笔记本时值不能为空,否则 drop 就不会继续排序
|
||||
if (itemNodeId) {
|
||||
|
|
|
@ -842,7 +842,7 @@ export const addResize = (obj: Layout | Wnd) => {
|
|||
documentSelf.ondragstart = () => {
|
||||
// 文件树拖拽会产生透明效果
|
||||
document.querySelectorAll(".sy__file .b3-list-item").forEach((item: HTMLElement) => {
|
||||
if (item.style.opacity === "0.1") {
|
||||
if (item.style.opacity === "0.38") {
|
||||
item.style.opacity = "";
|
||||
}
|
||||
});
|
||||
|
|
|
@ -150,7 +150,7 @@ export class Gutter {
|
|||
setTimeout(() => {
|
||||
ghostElement.remove();
|
||||
});
|
||||
buttonElement.style.opacity = "0.1";
|
||||
buttonElement.style.opacity = "0.38";
|
||||
window.siyuan.dragElement = avElement as HTMLElement || protyle.wysiwyg.element;
|
||||
event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}${buttonElement.getAttribute("data-type")}${Constants.ZWSP}${buttonElement.getAttribute("data-subtype")}${Constants.ZWSP}${selectIds}${Constants.ZWSP}${window.siyuan.config.system.workspaceDir}`,
|
||||
protyle.wysiwyg.element.innerHTML);
|
||||
|
|
|
@ -218,7 +218,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
|
|||
element.addEventListener("dragstart", (event: DragEvent) => {
|
||||
const target = event.target as HTMLElement;
|
||||
window.siyuan.dragElement = target.parentElement;
|
||||
window.siyuan.dragElement.style.opacity = ".1";
|
||||
window.siyuan.dragElement.style.opacity = ".38";
|
||||
dragBlockElement = hasClosestBlock(window.siyuan.dragElement) as HTMLElement;
|
||||
|
||||
const ghostElement = document.createElement("div");
|
||||
|
|
|
@ -179,7 +179,7 @@ export const openMenuPanel = (options: {
|
|||
}
|
||||
avPanelElement.addEventListener("dragstart", (event: DragEvent) => {
|
||||
window.siyuan.dragElement = event.target as HTMLElement;
|
||||
window.siyuan.dragElement.style.opacity = ".1";
|
||||
window.siyuan.dragElement.style.opacity = ".38";
|
||||
return;
|
||||
});
|
||||
avPanelElement.addEventListener("drop", (event) => {
|
||||
|
|
|
@ -258,7 +258,7 @@ data-def-path="${item.defPath}">
|
|||
if (liElement) {
|
||||
event.dataTransfer.setData("text/html", liElement.outerHTML);
|
||||
// 设置了的话 drop 就无法监听 alt event.dataTransfer.dropEffect = "move";
|
||||
liElement.style.opacity = "0.1";
|
||||
liElement.style.opacity = "0.38";
|
||||
window.siyuan.dragElement = liElement;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue