mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
b4469726a1
commit
f99a6d225c
4 changed files with 6 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ import {isInAndroid, isInHarmony, isInIOS} from "../../util/compatibility";
|
||||||
import {isMobile} from "../../../util/functions";
|
import {isMobile} from "../../../util/functions";
|
||||||
import {renderGallery} from "./gallery/render";
|
import {renderGallery} from "./gallery/render";
|
||||||
import {getViewIcon} from "./view";
|
import {getViewIcon} from "./view";
|
||||||
|
import {openMenuPanel} from "./openMenuPanel";
|
||||||
|
|
||||||
export const avRender = (element: Element, protyle: IProtyle, cb?: (data: IAV) => void, renderAll = true) => {
|
export const avRender = (element: Element, protyle: IProtyle, cb?: (data: IAV) => void, renderAll = true) => {
|
||||||
let avElements: Element[] = [];
|
let avElements: Element[] = [];
|
||||||
|
|
@ -582,6 +583,8 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (operation.action === "addAttrViewView") {
|
||||||
|
openMenuPanel({protyle, blockElement: item, type: "config"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item.removeAttribute("data-loading");
|
item.removeAttribute("data-loading");
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,7 @@ export const enableProtyle = (protyle: IProtyle) => {
|
||||||
});
|
});
|
||||||
const contentRect = protyle.contentElement.getBoundingClientRect();
|
const contentRect = protyle.contentElement.getBoundingClientRect();
|
||||||
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
||||||
if (item.querySelector(".av__title")) {
|
if (item.querySelector(".av__scroll")) {
|
||||||
stickyRow(item, contentRect, "all");
|
stickyRow(item, contentRect, "all");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export const resize = (protyle: IProtyle) => {
|
||||||
if (!protyle.disabled) {
|
if (!protyle.disabled) {
|
||||||
const contentRect = protyle.contentElement.getBoundingClientRect();
|
const contentRect = protyle.contentElement.getBoundingClientRect();
|
||||||
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
||||||
if (item.querySelector(".av__title")) {
|
if (item.querySelector(".av__scroll")) {
|
||||||
stickyRow(item, contentRect, "all");
|
stickyRow(item, contentRect, "all");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1681,7 +1681,7 @@ export class WYSIWYG {
|
||||||
protyle.observer = new ResizeObserver(() => {
|
protyle.observer = new ResizeObserver(() => {
|
||||||
const contentRect = protyle.contentElement.getBoundingClientRect();
|
const contentRect = protyle.contentElement.getBoundingClientRect();
|
||||||
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
||||||
if (item.querySelector(".av__title")) {
|
if (item.querySelector(".av__scroll")) {
|
||||||
stickyRow(item, contentRect, "all");
|
stickyRow(item, contentRect, "all");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue