mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 04:48:48 +01:00
This commit is contained in:
parent
c5bea14bd6
commit
f77d6bca7c
4 changed files with 11 additions and 6 deletions
|
|
@ -330,8 +330,6 @@
|
|||
}
|
||||
|
||||
&-content {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
white-space: break-spaces;
|
||||
word-break: break-word;
|
||||
margin: 8px 8px 0;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
hasClosestBlock,
|
||||
hasClosestByClassName,
|
||||
hasClosestByTag,
|
||||
hasTopClosestByClassName,
|
||||
hasTopClosestByClassName, isInAVBlock,
|
||||
isInEmbedBlock
|
||||
} from "../util/hasClosest";
|
||||
import {getIconByType} from "../../editor/getIcon";
|
||||
|
|
@ -2283,7 +2283,7 @@ export class Gutter {
|
|||
let hideParent = false;
|
||||
while (nodeElement) {
|
||||
let parentElement = hasClosestBlock(nodeElement.parentElement);
|
||||
if (!isInEmbedBlock(nodeElement)) {
|
||||
if (!isInEmbedBlock(nodeElement) && !isInAVBlock(nodeElement)) {
|
||||
let type;
|
||||
if (!hideParent) {
|
||||
type = nodeElement.getAttribute("data-type");
|
||||
|
|
|
|||
|
|
@ -204,9 +204,9 @@ export const initUI = (protyle: IProtyle) => {
|
|||
const embedElement = isInEmbedBlock(nodeElement);
|
||||
if (embedElement) {
|
||||
protyle.gutter.render(protyle, embedElement, protyle.wysiwyg.element);
|
||||
} else {
|
||||
protyle.gutter.render(protyle, nodeElement, protyle.wysiwyg.element, event.target);
|
||||
return;
|
||||
}
|
||||
protyle.gutter.render(protyle, nodeElement, protyle.wysiwyg.element, event.target);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,3 +122,10 @@ export const isInEmbedBlock = (element: Element) => {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const isInAVBlock = (element: Element) => {
|
||||
if (hasClosestByClassName(element, 'av__gallery-cover')) {
|
||||
return hasClosestByClassName(element, "av");
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue