From 538816bd9f4905e122fafe156ec183fa986c9947 Mon Sep 17 00:00:00 2001 From: qiqi Date: Tue, 1 Dec 2026 13:35:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20v3.26.161=20=E5=B9=B3=E7=A7=BB=E6=9C=9F?= =?UTF-8?q?=E9=97=B4=E6=8C=82=E8=BF=87=E5=8D=B3=E4=B8=8D=E5=8D=B8=E8=BD=BD?= =?UTF-8?q?=EF=BC=8C=E6=9D=BE=E6=89=8B=E5=90=8E=E6=8C=89=E8=A7=86=E5=8F=A3?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=EF=BC=88=E6=B6=88=E6=8E=89=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=8D=A2=E6=8C=82=E5=AF=BC=E8=87=B4=E7=9A=84=E7=AA=81=E7=8E=B0?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 12 ++++++++++-- package.json | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 94c5184..274b90b 100644 --- a/app.js +++ b/app.js @@ -7418,7 +7418,10 @@ const tbCenterSeed = (type, refs) => { } try { if (typeof refs.nodeCanvasDraw === 'function') refs.nodeCanvasDraw(x, y, scale) } catch (e) { /* ignore */ } // v3.26.156:平移窗口每跨 1/2 屏更新一次(此时才触发一次 React 渲染,代价可控) - if (!refs.pan || panMountAll) { refs.panCullAt = null } else { + if (!refs.pan || panMountAll) { + refs.panCullAt = null + if (refs.panKeep && refs.panKeep.size) refs.panKeep.clear() + } else { const at = refs.panCullAt const halfW = Math.max(220, (canvasSize.w || 800) * 0.34) const halfH = Math.max(160, (canvasSize.h || 600) * 0.34) @@ -7563,7 +7566,12 @@ const tbCenterSeed = (type, refs) => { return CanvasGeometry.cullRectsOf(canvasSize, navView, extra) }, [canvasSize.w, canvasSize.h, navView.x, navView.y, navView.scale, panCull, panMountAll]) const nodeVisible = (n) => CanvasGeometry.nodeVisibleIn(n, cullRects, { drag: refs.drag, resize: refs.resize, sel: sel, pan: !!refs.pan, mountAll: panMountAll, widthOf: nodeWidth, heightOf: hOf }) - const visibleIds = new Set(nodes.filter(nodeVisible).map((n) => n.id)) + // v3.26.161:平移期间「挂过就不卸」——只在手势中不断扩张挂载集合,松手后才按视口回收。 + // 之前即便边距加大,窗口一跳仍会有节点换挂(图片重新解码),视觉上就是节点突然出现。 + if (!refs.pan && refs.panKeep && refs.panKeep.size) refs.panKeep.clear() + const panKeep = (refs.pan && !panMountAll) ? (refs.panKeep || (refs.panKeep = new Set())) : null + const visibleIds = new Set(nodes.filter((n) => nodeVisible(n) || (panKeep && panKeep.has(n.id))).map((n) => n.id)) + if (panKeep) { for (const id of visibleIds) panKeep.add(id) } try { wSetScaleNow(viewport.scale) } catch (e) { /* ignore */ } // 进程内存(v3.25.74):状态栏显示,便于对比优化前后的内存占用(4s 轮询,窗口隐藏时不拉) diff --git a/package.json b/package.json index d2f7afe..a69dabf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "image-workbench-web", "private": true, - "version": "3.26.160", + "version": "3.26.161", "description": "Browser-based node canvas image workbench", "scripts": { "build": "node scripts/build.js && node scripts/copy-plugins.js", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index f70659b..18c3482 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image-workbench" -version = "3.26.160" +version = "3.26.161" description = "无限画布 · 生图工作台桌面版" authors = ["malongan"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 21879e1..9472f1d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "image-workbench", - "version": "3.26.160", + "version": "3.26.161", "identifier": "com.malongan.imageworkbench", "build": { "frontendDist": "../dist",