This commit is contained in:
Vanessa 2022-09-26 21:36:15 +08:00
parent 63a45bccfc
commit d85ede2b48
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,6 @@ export class BlockPanel {
if (this.element && window.siyuan.blockPanels.length > 1) {
this.element.classList.add("block__popover--top");
}
let targetElement = hasClosestByClassName(event.target, "block__icons");
let type = "move";
let x = event.clientX - parseInt(this.element.style.left);
@ -190,7 +189,7 @@ export class BlockPanel {
const index = parseInt(editorElement.getAttribute("data-index"));
const editor = new Protyle(editorElement, {
blockId: this.nodeIds[index],
defId: this.defIds[index] ||this.defIds[0] || "",
defId: this.defIds[index] || this.defIds[0] || "",
action: [Constants.CB_GET_ALL],
render: {
gutter: true,

View File

@ -840,6 +840,7 @@ export class Toolbar {
if (hasClosestByClassName(event.target as HTMLElement, "block__icon")) {
return;
}
event.stopPropagation();
const documentSelf = document;
this.subElement.style.userSelect = "none";
const x = event.clientX - parseInt(this.subElement.style.left);