Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/search/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const openSearchAsset = (element: HTMLElement, isStick: boolean) => {
moveEvent.stopPropagation();
const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
if (previousNowSize < 120 || nextNowSize < 120) {
if (nextNowSize < 120 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) {
return;
}
previewElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px";
Expand Down
3 changes: 2 additions & 1 deletion app/src/search/unRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export const openSearchUnRef = (element: HTMLElement, editor: Protyle) => {
moveEvent.stopPropagation();
const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
if (previousNowSize < 120 || nextNowSize < 120) {
// 编辑器 scroll 最小高度 155px https://github.com/siyuan-note/siyuan/issues/8519
if (nextNowSize < 155 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) {
return;
}
nextElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px";
Expand Down
3 changes: 2 additions & 1 deletion app/src/search/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele
moveEvent.stopPropagation();
const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x));
if (previousNowSize < 120 || nextNowSize < 120) {
// 编辑器 scroll 最小高度 155px https://github.com/siyuan-note/siyuan/issues/8519
if (nextNowSize < 155 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) {
return;
}
nextElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px";
Expand Down