mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
0f2c7fd418
commit
00f7439daf
7 changed files with 47 additions and 42 deletions
|
|
@ -164,7 +164,7 @@ export const openMenuPanel = (options: {
|
|||
} else if (options.type === "edit") {
|
||||
bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr});
|
||||
} else if (options.type === "config") {
|
||||
bindViewEvent({protyle: options.protyle, data, menuElement});
|
||||
bindViewEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement});
|
||||
}
|
||||
}
|
||||
if (options.cb) {
|
||||
|
|
@ -479,7 +479,7 @@ export const openMenuPanel = (options: {
|
|||
} else if (type === "go-config") {
|
||||
menuElement.innerHTML = getViewHTML(data.view);
|
||||
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);
|
||||
bindViewEvent({protyle: options.protyle, data, menuElement});
|
||||
bindViewEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
|
|
@ -690,39 +690,6 @@ export const openMenuPanel = (options: {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "toggle-view-title") {
|
||||
if (target.firstElementChild.getAttribute("xlink:href") === "#iconEyeoff") {
|
||||
// hide
|
||||
transaction(options.protyle, [{
|
||||
action: "hideAttrViewName",
|
||||
avID,
|
||||
blockID,
|
||||
data: true
|
||||
}], [{
|
||||
action: "hideAttrViewName",
|
||||
avID,
|
||||
blockID,
|
||||
data: false
|
||||
}]);
|
||||
options.blockElement.querySelector(".av__title").classList.add("av__title--hide");
|
||||
} else {
|
||||
transaction(options.protyle, [{
|
||||
action: "hideAttrViewName",
|
||||
avID,
|
||||
blockID,
|
||||
data: false
|
||||
}], [{
|
||||
action: "hideAttrViewName",
|
||||
avID,
|
||||
blockID,
|
||||
data: true
|
||||
}]);
|
||||
options.blockElement.querySelector(".av__title").classList.remove("av__title--hide");
|
||||
}
|
||||
avPanelElement.remove();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "duplicate-view") {
|
||||
const id = Lute.NewNodeID();
|
||||
transaction(options.protyle, [{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue