전략 편집기 수정

This commit is contained in:
Macbook
2026-06-15 00:43:19 +09:00
parent 78d9dca870
commit 2a2fe74933
2 changed files with 83 additions and 21 deletions
@@ -1295,15 +1295,17 @@ function StrategyEditorCanvasInner({
return;
}
const { flowPos, anchorId } = resolveDropFromClientRef.current(ev.x, ev.y);
const previewKey = anchorId
? `${anchorId}:${Math.round(flowPos.x)}:${Math.round(flowPos.y)}`
: '';
if (previewKey === lastPreviewKeyRef.current) return;
lastPreviewAnchorRef.current = anchorId;
lastPreviewKeyRef.current = previewKey;
if (anchorId) {
const sideKey = `${anchorId}:${Math.round(flowPos.x / 8)}:${Math.round(flowPos.y / 8)}`;
if (sideKey === lastPreviewKeyRef.current) return;
lastPreviewKeyRef.current = sideKey;
lastPreviewAnchorRef.current = anchorId;
updatePreviewRef.current(anchorId, flowPos);
} else {
return;
}
if (lastPreviewAnchorRef.current != null) {
lastPreviewAnchorRef.current = null;
lastPreviewKeyRef.current = null;
clearPreviewRef.current();
}
return;