mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
8998de9d81
commit
55fb8b19ab
4 changed files with 21 additions and 6 deletions
|
|
@ -207,6 +207,12 @@
|
|||
top: 8px;
|
||||
}
|
||||
|
||||
&--select {
|
||||
background-color: var(--b3-theme-primary-lightest);
|
||||
box-shadow: 2px 2px 0 var(--b3-theme-primary-lighter) inset, -2px -2px 0px var(--b3-theme-primary-lighter) inset;
|
||||
border-radius: var(--b3-border-radius);
|
||||
}
|
||||
|
||||
.block__icon {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import {hideElements} from "../protyle/ui/hideElements";
|
|||
import {emitOpenMenu} from "../plugin/EventBus";
|
||||
import {openMobileFileById} from "../mobile/editor";
|
||||
import {openBacklink, openGraph} from "../layout/dock/util";
|
||||
import {updateHeader} from "../protyle/render/av/col";
|
||||
|
||||
export const fileAnnotationRefMenu = (protyle: IProtyle, refElement: HTMLElement) => {
|
||||
const nodeElement = hasClosestBlock(refElement);
|
||||
|
|
@ -1663,8 +1664,11 @@ export const setFold = (protyle: IProtyle, nodeElement: Element, isOpen?: boolea
|
|||
focusBlock(nodeElement, undefined, false);
|
||||
}
|
||||
}
|
||||
nodeElement.querySelectorAll(".img--select").forEach((item) => {
|
||||
item.classList.remove("img--select");
|
||||
nodeElement.querySelectorAll(".img--select, .av__cell--select, .av__row--select").forEach((item:HTMLElement) => {
|
||||
if (item.classList.contains("av__row--select")) {
|
||||
updateHeader(item);
|
||||
}
|
||||
item.classList.remove("img--select", "av__cell--select", "av__row--select");
|
||||
});
|
||||
}
|
||||
const id = nodeElement.getAttribute("data-node-id");
|
||||
|
|
|
|||
|
|
@ -490,6 +490,7 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElem
|
|||
if (doOperations.length > 0) {
|
||||
transaction(protyle, doOperations, undoOperations);
|
||||
}
|
||||
cellElements[0].classList.add("av__cell--select");
|
||||
setTimeout(() => {
|
||||
avMaskElement.remove();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ import {removeSearchMark} from "../toolbar/util";
|
|||
import {activeBlur, hideKeyboardToolbar} from "../../mobile/util/keyboardToolbar";
|
||||
import {commonClick} from "./commonClick";
|
||||
import {avClick, avContextmenu, updateAVName} from "../render/av/action";
|
||||
import {updateHeader} from "../render/av/col";
|
||||
|
||||
export class WYSIWYG {
|
||||
public lastHTMLs: { [key: string]: string } = {};
|
||||
|
|
@ -185,10 +186,13 @@ export class WYSIWYG {
|
|||
|
||||
private setEmptyOutline(protyle: IProtyle, element: HTMLElement) {
|
||||
// 图片移除选择状态应放在前面,否则 https://github.com/siyuan-note/siyuan/issues/4173
|
||||
const selectImgElement = protyle.wysiwyg.element.querySelector(".img--select");
|
||||
if (selectImgElement) {
|
||||
selectImgElement.classList.remove("img--select");
|
||||
}
|
||||
protyle.wysiwyg.element.querySelectorAll(".img--select, .av__cell--select, .av__row--select").forEach((item: HTMLElement) => {
|
||||
if (item.classList.contains("av__row--select")) {
|
||||
updateHeader(item);
|
||||
}
|
||||
item.classList.remove("img--select", "av__cell--select", "av__row--select");
|
||||
});
|
||||
|
||||
let nodeElement = element;
|
||||
if (!element.getAttribute("data-node-id")) {
|
||||
const tempElement = hasClosestBlock(element);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue