Skip to content

Commit c59461b

Browse files
committed
更新版本V0.0.48
更新版本V0.0.48
1 parent f92af2e commit c59461b

File tree

8 files changed

+46
-44
lines changed

8 files changed

+46
-44
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
> 最新更新:2025-04-25
3232
33-
> 0.0.47 公测版本介绍 如果你要使用本插件请务必进我们的官方 QQ 群(1018231382)!
33+
> 0.0.48 公测版本介绍 如果你要使用本插件请务必进我们的官方 QQ 群(1018231382)!
3434
>
3535
> 1. 新增辅助功能,限制了窗口的移动范围防止超出可视范围,以及悬浮球也限制了移动范围
3636
>

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Due to limited personal time, the frequency of updating plug-ins will not be ver
2626

2727
> Last updated: 2025-04-25
2828
29-
> 0.0.47 Public Beta Version Introduction: If you want to use this plugin, please be sure to join our official QQ group (1018231382)!
29+
> 0.0.48 Public Beta Version Introduction: If you want to use this plugin, please be sure to join our official QQ group (1018231382)!
3030
>
3131
> 1. New auxiliary functions have been added, which limit the movement range of the window to prevent it from exceeding the visible range, and the floating ball also restricts the movement range
3232
>

dist/javascript/main.entry.js

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/javascript/main.entry.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "weilin-comfyui-tools"
33
description = "让你在 ComfyUI 中快捷的使用提示词工具 Quickly use the prompt word tool in ComfyUI"
4-
version = "0.0.47"
4+
version = "0.0.48"
55
license = {file = "LICENSE"}
66
dependencies = []
77

src/src/components/DraggableWindow.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,20 @@ onMounted(() => {
8585
if (props.position) {
8686
const viewportWidth = window.innerWidth;
8787
const viewportHeight = window.innerHeight;
88+
const minLeftSpace = 100; // 左侧保留的最小空间
8889
8990
// 边界检测
9091
let x = props.position.x;
9192
let y = props.position.y;
9293
93-
// 确保左侧不超出边界
94-
x = Math.max(50, x);
95-
// 确保右侧不超出边界
96-
x = Math.min(x, viewportWidth - (props.size?.width || currentSize.value.width));
94+
// 确保左侧保留至少窗口宽度100px的位置
95+
x = Math.max(minLeftSpace - (props.size?.width || currentSize.value.width), x);
96+
// 确保右侧保留最少100px的位置
97+
x = Math.min(x, viewportWidth - 100);
9798
// 确保顶部不超出边界
9899
y = Math.max(50, y);
99-
// 确保底部不超出边界
100-
y = Math.min(y, viewportHeight - (props.size?.height || currentSize.value.height));
100+
// 确保底部保留最少100px的位置
101+
y = Math.min(y, viewportHeight - 100);
101102
102103
currentPosition.value = { x, y };
103104
}
@@ -126,18 +127,19 @@ const handleDrag = (event) => {
126127
if (isDragging.value) {
127128
const viewportWidth = window.innerWidth;
128129
const viewportHeight = window.innerHeight;
130+
const minLeftSpace = 100; // 左侧保留的最小空间
129131
130132
let newX = event.clientX - dragOffset.value.x;
131133
let newY = event.clientY - dragOffset.value.y;
132134
133-
// 确保左侧不超出边界
134-
newX = Math.max(50, newX);
135-
// 确保右侧不超出边界
136-
newX = Math.min(newX, viewportWidth - currentSize.value.width);
135+
// 确保左侧保留至少窗口宽度100px的位置
136+
newX = Math.max(minLeftSpace - currentSize.value.width, newX);
137+
// 确保右侧保留最少100px的位置
138+
newX = Math.min(newX, viewportWidth - 100);
137139
// 确保顶部不超出边界
138140
newY = Math.max(50, newY);
139-
// 确保底部不超出边界
140-
newY = Math.min(newY, viewportHeight - currentSize.value.height);
141+
// 确保底部保留最少100px的位置
142+
newY = Math.min(newY, viewportHeight - 100);
141143
142144
const newPosition = {
143145
x: newX,

src/src/utils/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = "v0.0.47";
1+
export const version = "v0.0.48";

0 commit comments

Comments
 (0)