mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 09:24:06 +01:00
This commit is contained in:
parent
132cef442f
commit
8fb629db73
4 changed files with 22 additions and 3 deletions
|
|
@ -450,7 +450,11 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
nodeAttrHTML += refElement.outerHTML;
|
||||
}
|
||||
if (data.new["custom-riff-decks"]) {
|
||||
protyle.title.element.style.animation = "addCard 450ms linear";
|
||||
protyle.title.element.setAttribute("custom-riff-decks", data.new["custom-riff-decks"]);
|
||||
setTimeout(() => {
|
||||
protyle.title.element.style.animation = "";
|
||||
}, 450)
|
||||
} else {
|
||||
protyle.title.element.removeAttribute("custom-riff-decks");
|
||||
}
|
||||
|
|
@ -473,7 +477,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
}
|
||||
return;
|
||||
}
|
||||
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach(item => {
|
||||
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((item: HTMLElement) => {
|
||||
if (item.getAttribute("data-type") === "NodeThematicBreak") {
|
||||
return;
|
||||
}
|
||||
|
|
@ -482,6 +486,12 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
});
|
||||
Object.keys(data.new).forEach(key => {
|
||||
item.setAttribute(key, data.new[key]);
|
||||
if (key === "custom-riff-decks") {
|
||||
item.style.animation = "addCard 450ms linear";
|
||||
setTimeout(() => {
|
||||
item.style.animation = "";
|
||||
}, 450)
|
||||
}
|
||||
});
|
||||
const refElement = item.lastElementChild.querySelector(".protyle-attr--refcount");
|
||||
if (refElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue