This commit is contained in:
parent
3110b3e1fb
commit
63badb1c74
6 changed files with 10 additions and 6 deletions
|
@ -481,6 +481,10 @@
|
|||
&-background__img img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
&-scroll {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.av__views .block__icon {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
.protyle-scroll {
|
||||
--b3-dynamicscroll-width: 200px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: 10px;
|
||||
top: 30px;
|
||||
width: 16px;
|
||||
bottom: 9px; // 下图标 hover 时,需要留出一定的空间
|
||||
|
|
|
@ -195,7 +195,7 @@ export class BlockPanel {
|
|||
}
|
||||
// 由于 afterCB 中高度的设定,需在之后再进行设定
|
||||
// 49 = 16(上图标)+16(下图标)+8(padding)+9(底部距离)
|
||||
editor.protyle.scroll.element.parentElement.setAttribute("style", `--b3-dynamicscroll-width:${Math.min(editor.protyle.contentElement.clientHeight - 49, 200)}px;${isMobile() ? "" : "right:10px"}`);
|
||||
editor.protyle.scroll.element.parentElement.setAttribute("style", `--b3-dynamicscroll-width:${Math.min(editor.protyle.contentElement.clientHeight - 49, 200)}px;`);
|
||||
}
|
||||
});
|
||||
this.editors.push(editor);
|
||||
|
|
|
@ -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
Reference in a new issue