스냅 기능 변경

This commit is contained in:
dohyeons 2025-10-22 16:49:57 +09:00
parent 0a28445abe
commit 7c3a2dff4c
1 changed files with 3 additions and 3 deletions

View File

@ -259,8 +259,8 @@ export function findNearestGuideline(
return { nearest, distance: minDistance };
}
// 자석 스냅 (10px 이내면 스냅)
// 강제 스냅 (항상 가장 가까운 가이드라인에 스냅)
export function magneticSnap(value: number, guidelines: number[]): number {
const { nearest, distance } = findNearestGuideline(value, guidelines);
return distance <= GRID_CONFIG.SNAP_DISTANCE ? nearest : value;
const { nearest } = findNearestGuideline(value, guidelines);
return nearest; // 거리 체크 없이 무조건 스냅
}