전략편집기 전략컨트롤 드래그

This commit is contained in:
Macbook
2026-06-15 01:28:56 +09:00
parent b0e2efd7cb
commit 3150dc8af6
7 changed files with 35 additions and 22 deletions
@@ -1336,20 +1336,10 @@ function StrategyEditorCanvasInner({
if (!needsPointerPaletteDrag()) return;
return subscribePaletteDrag((ev: PaletteDragEvent) => {
if (ev.phase === 'move') {
if (!isOverStrategyBuilder(ev.x, ev.y)) {
if (lastPreviewAnchorRef.current != null) {
lastPreviewAnchorRef.current = null;
lastPreviewKeyRef.current = null;
clearPreviewRef.current();
}
return;
}
const { flowPos, anchorId } = resolveDropFromClientRef.current(ev.x, ev.y);
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;
lastPreviewKeyRef.current = `${anchorId}:${Math.round(flowPos.x / 8)}:${Math.round(flowPos.y / 8)}`;
updatePreviewRef.current(anchorId, flowPos);
return;
}