mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
0e334d1ca0
commit
992ab53f4b
4 changed files with 25 additions and 0 deletions
|
|
@ -282,6 +282,11 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
||||||
blockID: blockElement.getAttribute("data-node-id"),
|
blockID: blockElement.getAttribute("data-node-id"),
|
||||||
id: target.dataset.id,
|
id: target.dataset.id,
|
||||||
avID: blockElement.getAttribute("data-av-id"),
|
avID: blockElement.getAttribute("data-av-id"),
|
||||||
|
}], [{
|
||||||
|
action: "setAttrViewBlockView",
|
||||||
|
blockID: blockElement.getAttribute("data-node-id"),
|
||||||
|
id: target.parentElement.querySelector(".item--focus").getAttribute("data-id"),
|
||||||
|
avID: blockElement.getAttribute("data-av-id"),
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -1427,6 +1427,11 @@ export const openMenuPanel = (options: {
|
||||||
blockID,
|
blockID,
|
||||||
id: target.parentElement.dataset.id,
|
id: target.parentElement.dataset.id,
|
||||||
avID
|
avID
|
||||||
|
}], [{
|
||||||
|
action: "setAttrViewBlockView",
|
||||||
|
blockID,
|
||||||
|
id: options.blockElement.querySelector(".av__views .item--focus").getAttribute("data-id"),
|
||||||
|
avID
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -1447,6 +1452,11 @@ export const openMenuPanel = (options: {
|
||||||
blockID,
|
blockID,
|
||||||
id: target.parentElement.dataset.id,
|
id: target.parentElement.dataset.id,
|
||||||
avID,
|
avID,
|
||||||
|
}], [{
|
||||||
|
action: "setAttrViewBlockView",
|
||||||
|
blockID,
|
||||||
|
id: options.blockElement.querySelector(".av__views .item--focus").getAttribute("data-id"),
|
||||||
|
avID,
|
||||||
}]);
|
}]);
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
openViewMenu({
|
openViewMenu({
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,11 @@ export const bindSwitcherEvent = (options: { protyle: IProtyle, menuElement: Ele
|
||||||
blockID: options.blockElement.getAttribute("data-node-id"),
|
blockID: options.blockElement.getAttribute("data-node-id"),
|
||||||
id: currentElement.dataset.id,
|
id: currentElement.dataset.id,
|
||||||
avID: options.blockElement.getAttribute("data-av-id"),
|
avID: options.blockElement.getAttribute("data-av-id"),
|
||||||
|
}], [{
|
||||||
|
action: "setAttrViewBlockView",
|
||||||
|
blockID: options.blockElement.getAttribute("data-node-id"),
|
||||||
|
id: options.blockElement.querySelector(".av__views .item--focus").getAttribute("data-id"),
|
||||||
|
avID: options.blockElement.getAttribute("data-av-id"),
|
||||||
}]);
|
}]);
|
||||||
options.menuElement.remove();
|
options.menuElement.remove();
|
||||||
focusBlock(options.blockElement);
|
focusBlock(options.blockElement);
|
||||||
|
|
|
||||||
|
|
@ -2166,6 +2166,11 @@ export class WYSIWYG {
|
||||||
blockID: nodeElement.getAttribute("data-node-id"),
|
blockID: nodeElement.getAttribute("data-node-id"),
|
||||||
id: avTabHeaderElement.dataset.id,
|
id: avTabHeaderElement.dataset.id,
|
||||||
avID: nodeElement.getAttribute("data-av-id"),
|
avID: nodeElement.getAttribute("data-av-id"),
|
||||||
|
}], [{
|
||||||
|
action: "setAttrViewBlockView",
|
||||||
|
blockID: nodeElement.getAttribute("data-node-id"),
|
||||||
|
id: avTabHeaderElement.parentElement.querySelector(".item--focus").getAttribute("data-id"),
|
||||||
|
avID: nodeElement.getAttribute("data-av-id"),
|
||||||
}]);
|
}]);
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
openViewMenu({
|
openViewMenu({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue