전략 편집기 수정
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user