auto-save 2026-05-14 02:19 (~4)
This commit is contained in:
@@ -2875,6 +2875,19 @@
|
||||
"type": "session-heartbeat",
|
||||
"message": "Claude 会话活跃 · 最近命令:claude · 2 项未提交变更 · 最近提交:auto-save 2026-05-14 02:08 (~1)",
|
||||
"files_changed": 2
|
||||
},
|
||||
{
|
||||
"ts": "2026-05-14T02:14:27+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-05-14 02:14 (+4, ~3)",
|
||||
"hash": "b98b486",
|
||||
"files_changed": 7
|
||||
},
|
||||
{
|
||||
"ts": "2026-05-13T18:18:48Z",
|
||||
"type": "session-heartbeat",
|
||||
"message": "Codex 会话活跃 · 最近命令:codex · 4 项未提交变更 · 最近提交:auto-save 2026-05-14 02:14 (+4, ~3)",
|
||||
"files_changed": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -831,6 +831,19 @@ api/main.py
|
||||
<h2>变更记录</h2>
|
||||
<p>这个记录不是 git log 的替代品。它记录“产品理解发生了什么变化、影响了哪些源码、你以后描述需求时该怎么说”。后续每次改功能都要补一条。</p>
|
||||
<div class="changelog">
|
||||
<article class="change">
|
||||
<header>
|
||||
<h3>2026-05-14 · 修复节点右下角缩放点击偏移</h3>
|
||||
<span class="tag violet">Canvas</span>
|
||||
<span class="tag blue">Resize</span>
|
||||
</header>
|
||||
<div class="body">
|
||||
<p><strong>问题:</strong>点击或轻微拖动卡片右下角缩放把手时,节点会突然偏移/跳变,影响在无限画布上精调卡片大小。</p>
|
||||
<p><strong>原因:</strong><code>getComputedStyle(nodeEl).width/height</code> 读到的已经是 ReactFlow 节点坐标下的布局尺寸,旧逻辑又除了一次 <code>zoom</code>,导致拖动起始宽高被放大或缩小;点击时 1px 级 pointermove 也会立刻写入错误宽高。</p>
|
||||
<p><strong>改动:</strong>起始宽高直接使用 computed style,只有鼠标移动量按 zoom 换算;增加 2px 点击死区,单纯点击缩放角不再改写节点尺寸。</p>
|
||||
<p><strong>影响:</strong><code>web/components/nodes/resize-handle.tsx</code>、<code>docs/source-analysis.html</code>。</p>
|
||||
</div>
|
||||
</article>
|
||||
<article class="change">
|
||||
<header>
|
||||
<h3>2026-05-14 · 缩略图 hover 原尺寸预览贴缩略图上边缘</h3>
|
||||
|
||||
@@ -914,7 +914,12 @@ export function AudioNode({ data, selected }: any) {
|
||||
selected={selected}
|
||||
pinned={d.pinnedNodes?.has("audio")}
|
||||
onTogglePin={() => d.onToggleNodePin?.("audio")}
|
||||
/>
|
||||
>
|
||||
<div className="text-[11px] text-[var(--text-soft)] leading-snug">
|
||||
音轨 → ASR 转录 → 英中翻译 → 接 SKG 卖点改写文案<br />
|
||||
<span className="text-[var(--text-faint)] font-mono">Gemini 2.5 Flash</span>
|
||||
</div>
|
||||
</NodeShell>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -29,12 +29,17 @@ function startResize(
|
||||
const startX = e.clientX
|
||||
const startY = e.clientY
|
||||
const zoom = getZoom() || 1
|
||||
const startWidth = parseFloat(getComputedStyle(nodeEl).width) / zoom
|
||||
const startHeight = parseFloat(getComputedStyle(nodeEl).height) / zoom
|
||||
// computedStyle width/height are already in ReactFlow node coordinates.
|
||||
// Only pointer movement needs zoom normalization because clientX/Y are viewport pixels.
|
||||
const startWidth = parseFloat(getComputedStyle(nodeEl).width)
|
||||
const startHeight = parseFloat(getComputedStyle(nodeEl).height)
|
||||
|
||||
const onMove = (ev: globalThis.PointerEvent) => {
|
||||
const dx = (ev.clientX - startX) / zoom
|
||||
const dy = (ev.clientY - startY) / zoom
|
||||
const rawDx = ev.clientX - startX
|
||||
const rawDy = ev.clientY - startY
|
||||
if (Math.abs(rawDx) < 2 && Math.abs(rawDy) < 2) return
|
||||
const dx = rawDx / zoom
|
||||
const dy = rawDy / zoom
|
||||
const wantW = axis === "y" ? null : Math.max(bounds.minWidth, Math.min(bounds.maxWidth, startWidth + dx))
|
||||
const wantH = axis === "x" ? null : Math.max(bounds.minHeight, Math.min(bounds.maxHeight, startHeight + dy))
|
||||
setNodes((nodes) =>
|
||||
|
||||
Reference in New Issue
Block a user