스냅 기능 변경
This commit is contained in:
parent
0a28445abe
commit
7c3a2dff4c
|
|
@ -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; // 거리 체크 없이 무조건 스냅
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue