mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
This commit is contained in:
parent
dc7f763054
commit
5cce04da49
6 changed files with 47 additions and 32 deletions
|
|
@ -7,6 +7,7 @@ import {unicode2Emoji} from "../../../emoji";
|
|||
import {focusBlock} from "../../util/selection";
|
||||
import {isMac} from "../../util/compatibility";
|
||||
import {hasClosestByClassName} from "../../util/hasClosest";
|
||||
import {stickyRow} from "./row";
|
||||
|
||||
export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) => {
|
||||
let avElements: Element[] = [];
|
||||
|
|
@ -240,12 +241,19 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
|
|||
if (left) {
|
||||
e.querySelector(".av__scroll").scrollLeft = left;
|
||||
}
|
||||
|
||||
const editRect = protyle.contentElement.getBoundingClientRect();
|
||||
if (headerTransform) {
|
||||
(e.querySelector(".av__row--header") as HTMLElement).style.transform = headerTransform;
|
||||
} else {
|
||||
stickyRow(e, editRect, "top");
|
||||
}
|
||||
if (footerTransform) {
|
||||
(e.querySelector(".av__row--footer") as HTMLElement).style.transform = footerTransform;
|
||||
} else {
|
||||
stickyRow(e, editRect, "bottom");
|
||||
}
|
||||
|
||||
if (selectCellId) {
|
||||
const newCellElement = e.querySelector(`.av__row[data-id="${selectCellId.split(Constants.ZWSP)[0]}"] .av__cell[data-col-id="${selectCellId.split(Constants.ZWSP)[1]}"]`);
|
||||
if (newCellElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue