mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-12 23:21:23 +08:00
This commit is contained in:
parent
2cac581630
commit
f2de7bf6e6
@ -125,10 +125,6 @@
|
||||
flex-direction: column;
|
||||
border-bottom: 1px solid var(--b3-theme-surface-lighter);
|
||||
|
||||
.protyle-wysiwyg {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
@ -261,6 +261,20 @@
|
||||
.protyle-content {
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
|
||||
&--transition {
|
||||
.protyle-wysiwyg {
|
||||
transition: padding .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
}
|
||||
|
||||
.protyle-title {
|
||||
transition: margin .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
}
|
||||
|
||||
.protyle-background__iconw {
|
||||
transition: left .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.protyle-background {
|
||||
@ -401,7 +415,6 @@
|
||||
display: flex;
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
transition: left .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
|
||||
.protyle-icons {
|
||||
position: initial;
|
||||
@ -414,7 +427,6 @@
|
||||
margin: 34px 16px 0 24px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
transition: margin .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
|
||||
&:hover .protyle-title__icon {
|
||||
opacity: 1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
.protyle-wysiwyg {
|
||||
padding: 34px 16px 16px 24px;
|
||||
cursor: text;
|
||||
transition: padding .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
.protyle-breadcrumb__bar {
|
||||
|
@ -81,10 +81,14 @@ export class Layout {
|
||||
item.element.classList.add("fn__flex-1");
|
||||
if (this.direction === "lr") {
|
||||
// 向右分屏,左侧文档抖动,移除动画和边距
|
||||
item.element.querySelectorAll(".protyle-wysiwyg").forEach((element: HTMLElement) => {
|
||||
element.style.transition = "none";
|
||||
element.style.paddingRight = "16px";
|
||||
element.style.paddingLeft = "24px";
|
||||
item.element.querySelectorAll(".protyle-content").forEach((element: HTMLElement) => {
|
||||
if (!element.parentElement.classList.contains("fn__none")) {
|
||||
element.classList.remove("protyle-content--transition");
|
||||
const wysiwygElement = element.querySelector(".protyle-wysiwyg") as HTMLElement;
|
||||
wysiwygElement.style.paddingRight = "16px";
|
||||
wysiwygElement.style.paddingLeft = "24px";
|
||||
element.classList.add("protyle-content--transition");
|
||||
}
|
||||
});
|
||||
}
|
||||
item.element.after(child.element);
|
||||
|
@ -625,9 +625,7 @@ export const addResize = (obj: Layout | Wnd) => {
|
||||
const documentSelf = document;
|
||||
const nextElement = resizeElement.nextElementSibling as HTMLElement;
|
||||
const previousElement = resizeElement.previousElementSibling as HTMLElement;
|
||||
nextElement.style.transition = "";
|
||||
nextElement.style.overflow = "auto"; // 拖动时 layout__resize 会出现 https://github.com/siyuan-note/siyuan/issues/6221
|
||||
previousElement.style.transition = "";
|
||||
previousElement.style.overflow = "auto";
|
||||
setSize(nextElement, direction);
|
||||
setSize(previousElement, direction);
|
||||
|
@ -217,6 +217,7 @@ export class Protyle {
|
||||
}
|
||||
});
|
||||
}
|
||||
this.protyle.contentElement.classList.add("protyle-content--transition")
|
||||
}
|
||||
|
||||
private init() {
|
||||
|
@ -124,7 +124,6 @@ export const setPadding = (protyle: IProtyle) => {
|
||||
} else {
|
||||
protyle.wysiwyg.element.style.padding = `16px ${min16}px ${bottomHeight} ${min24}px`;
|
||||
}
|
||||
protyle.wysiwyg.element.style.transition = ""; // addWnd 时防止向右分屏,左侧文档抖动,移除动画
|
||||
if (window.siyuan.config.editor.codeSyntaxHighlightLineNum) {
|
||||
setTimeout(() => { // https://github.com/siyuan-note/siyuan/issues/5612
|
||||
protyle.wysiwyg.element.querySelectorAll('.code-block [contenteditable="true"]').forEach((block: HTMLElement) => {
|
||||
|
Loading…
Reference in New Issue
Block a user