mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 16:06:13 +01:00
This commit is contained in:
parent
3110b3e1fb
commit
63badb1c74
6 changed files with 10 additions and 6 deletions
|
|
@ -17,9 +17,6 @@ export class Scroll {
|
|||
constructor(protyle: IProtyle) {
|
||||
this.parentElement = document.createElement("div");
|
||||
this.parentElement.classList.add("protyle-scroll");
|
||||
if (!isMobile()) {
|
||||
this.parentElement.style.right = "10px";
|
||||
}
|
||||
this.parentElement.innerHTML = `<div class="protyle-scroll__up ariaLabel" data-position="right4top" aria-label="${updateHotkeyTip("⌘Home")}">
|
||||
<svg><use xlink:href="#iconUp"></use></svg>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ export const resize = (protyle: IProtyle) => {
|
|||
const MIN_ABS = 4;
|
||||
// 不能 clearTimeout,否则 split 时左侧无法 resize
|
||||
setTimeout(() => {
|
||||
if (protyle.scroll && protyle.scroll.element.parentElement.getAttribute("style")) {
|
||||
protyle.scroll.element.parentElement.setAttribute("style", `--b3-dynamicscroll-width:${Math.min(protyle.contentElement.clientHeight - 49, 200)}px`);
|
||||
}
|
||||
if (!protyle.disabled) {
|
||||
const contentRect = protyle.contentElement.getBoundingClientRect();
|
||||
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ export class WYSIWYG {
|
|||
}
|
||||
nodeElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => {
|
||||
if ((newIndex.rowIndex < firstCellIndex.rowIndex && index >= newIndex.rowIndex && index < firstCellIndex.rowIndex) ||
|
||||
(newIndex.rowIndex > dragFillCellIndex.rowIndex && index <= newIndex.rowIndex&& index > dragFillCellIndex.rowIndex)) {
|
||||
(newIndex.rowIndex > dragFillCellIndex.rowIndex && index <= newIndex.rowIndex && index > dragFillCellIndex.rowIndex)) {
|
||||
rowElement.querySelectorAll(".av__cell").forEach((cellElement: HTMLElement, cellIndex: number) => {
|
||||
if (cellIndex >= firstCellIndex.celIndex && cellIndex <= newIndex.celIndex) {
|
||||
cellElement.classList.add("av__cell--active");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue