fix: v3.26.161 平移期间挂过即不卸载,松手后按视口回收(消掉节点换挂导致的突现)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 48s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 48s
This commit is contained in:
1 parent
5bd9e925fd
commit
538816bd9f
4 files changed
+13
-5
No files matched your search
@@ -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 轮询,窗口隐藏时不拉)
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.26.160"
|
||||
version = "3.26.161"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user