전략편집기 전략컨트롤 드래그
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user