mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
29712f6f77
commit
61ee5676c4
10 changed files with 76 additions and 44 deletions
|
|
@ -122,7 +122,11 @@ export class Files extends Model {
|
|||
if (target.classList.contains("b3-list-item__icon")) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
openEmojiPanel(target.parentElement.getAttribute("data-url"), target, true);
|
||||
const rect = target.getBoundingClientRect();
|
||||
openEmojiPanel(target.parentElement.getAttribute("data-url"), "notebook", {
|
||||
x: rect.left,
|
||||
y: rect.bottom
|
||||
});
|
||||
break;
|
||||
} else if (type === "toggle") {
|
||||
if (this.closeElement.classList.contains("fn__flex-1")) {
|
||||
|
|
@ -239,10 +243,17 @@ export class Files extends Model {
|
|||
if (!event.metaKey && !event.ctrlKey && target.classList.contains("b3-list-item__icon") && window.siyuan.config.system.container !== "ios") {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const rect = target.getBoundingClientRect();
|
||||
if (target.parentElement.getAttribute("data-type") === "navigation-file") {
|
||||
openEmojiPanel(target.parentElement.getAttribute("data-node-id"), target);
|
||||
openEmojiPanel(target.parentElement.getAttribute("data-node-id"), "doc", {
|
||||
x: rect.left,
|
||||
y: rect.bottom
|
||||
});
|
||||
} else {
|
||||
openEmojiPanel(target.parentElement.parentElement.getAttribute("data-url"), target, true);
|
||||
openEmojiPanel(target.parentElement.parentElement.getAttribute("data-url"), "notebook", {
|
||||
x: rect.left,
|
||||
y: rect.bottom
|
||||
});
|
||||
}
|
||||
break;
|
||||
} else if (!event.metaKey && !event.ctrlKey && target.classList.contains("b3-list-item__toggle")) {
|
||||
|
|
@ -260,7 +271,7 @@ export class Files extends Model {
|
|||
newFile({
|
||||
app: options.app,
|
||||
notebookId,
|
||||
currentPath:pathString,
|
||||
currentPath: pathString,
|
||||
useSavePath: false
|
||||
});
|
||||
} else if (type === "more-root") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue