Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/3005

Vanessa28b79219e3d9
diff --git a/app/src/asset/pdf/pdf_sidebar_resizer.js b/app/src/asset/pdf/pdf_sidebar_resizer.js
index 4e4d88a0af..4f634fb3a1 100644
--- a/app/src/asset/pdf/pdf_sidebar_resizer.js
+++ b/app/src/asset/pdf/pdf_sidebar_resizer.js
@@ -53,7 +53,8 @@ class PDFSidebarResizer {
* @type {number}
*/
get outerContainerWidth() {
- return (this._outerContainerWidth ||= this.outerContainer.clientWidth);
+ // NOTE
+ return this.outerContainer.clientWidth;
}
/**
@@ -63,7 +64,8 @@ class PDFSidebarResizer {
_updateWidth(width = 0) {
// Prevent the sidebar from becoming too narrow, or from occupying more
// than half of the available viewer width.
- const maxWidth = Math.floor(this.outerContainerWidth / 2);
+ // NOTE
+ const maxWidth = Math.floor(this.outerContainerWidth / 3 * 2);
if (width > maxWidth) {
width = maxWidth;
}
@@ -84,6 +86,7 @@ class PDFSidebarResizer {
* @private
*/
_mouseMove(evt) {
+ // NOTE
let width = evt.clientX - this.outerContainer.getBoundingClientRect().left;
// For sidebar resizing to work correctly in RTL mode, invert the width.
if (this.isRTL) {
diff --git a/app/src/assets/scss/pdf/_pdf.scss b/app/src/assets/scss/pdf/_pdf.scss
index 5054177212..6d766feb5b 100644
--- a/app/src/assets/scss/pdf/_pdf.scss
+++ b/app/src/assets/scss/pdf/_pdf.scss
@@ -224,13 +224,22 @@
position: absolute;
top: 0;
bottom: 0;
- width: 1px;
+ width: 6px;
z-index: 200;
cursor: ew-resize;
right: -6px;
- background-color: var(--b3-border-color);
- &:hover {
+ &:after {
+ content: "";
+ width: 1px;
+ height: 100%;
+ background-color: var(--b3-border-color);
+ position: absolute;
+ top: 0;
+ left: 3px;
+ }
+
+ &:hover:after {
background-color: var(--b3-scroll-color);
}
}