fix: v3.26.160 平移裁剪窗口边距 1.5 屏、更新步长 1/3 屏(修节点在视野内突然出现)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 47s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 47s
This commit is contained in:
1 parent
e02364fd93
commit
5bd9e925fd
5 files changed
+7
-7
No files matched your search
@@ -7420,8 +7420,8 @@ const tbCenterSeed = (type, refs) => {
|
||||
// v3.26.156:平移窗口每跨 1/2 屏更新一次(此时才触发一次 React 渲染,代价可控)
|
||||
if (!refs.pan || panMountAll) { refs.panCullAt = null } else {
|
||||
const at = refs.panCullAt
|
||||
const halfW = Math.max(320, (canvasSize.w || 800) * 0.5)
|
||||
const halfH = Math.max(240, (canvasSize.h || 600) * 0.5)
|
||||
const halfW = Math.max(220, (canvasSize.w || 800) * 0.34)
|
||||
const halfH = Math.max(160, (canvasSize.h || 600) * 0.34)
|
||||
if (!at || Math.abs(x - at.x) > halfW || Math.abs(y - at.y) > halfH) {
|
||||
refs.panCullAt = { x: x, y: y }
|
||||
try { setPanCull({ x: x, y: y, scale: scale }) } catch (e) { /* ignore */ }
|
||||
@@ -7559,7 +7559,7 @@ const tbCenterSeed = (type, refs) => {
|
||||
// 窗口额外放 0.7 屏边距,保证两次更新之间不会露白。
|
||||
const navView = (refs.pan && panCull && !panMountAll) ? panCull : viewport
|
||||
const cullRects = React.useMemo(() => {
|
||||
const extra = (refs.pan && !panMountAll) ? (Math.max(canvasSize.w || 0, canvasSize.h || 0) / (navView.scale || 1)) * 0.7 : 0
|
||||
const extra = (refs.pan && !panMountAll) ? (Math.max(canvasSize.w || 0, canvasSize.h || 0) / (navView.scale || 1)) * 1.5 : 0
|
||||
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 })
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.26.159",
|
||||
"version": "3.26.160",
|
||||
"description": "Browser-based node canvas image workbench",
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js && node scripts/copy-plugins.js",
|
||||
|
||||
Generated
+1
-1
@@ -2014,7 +2014,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "image-workbench"
|
||||
version = "3.26.158"
|
||||
version = "3.26.160"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"base64 0.22.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.26.159"
|
||||
version = "3.26.160"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.26.159",
|
||||
"version": "3.26.160",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
Reference in new issue
Block a user