fix(project): 타임라인 드래그를 날짜 칸 단위로(반나절에 걸리던 문제) — snap 을 가장 가까운 날 0시로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 14:42:45 +09:00
parent 6dfc6109a4
commit 52c1b004e6
7 changed files with 18 additions and 10 deletions
+7
View File
@@ -3385,6 +3385,13 @@
margin: { item: Math.round(8 * tz) },
// 먼저 눌러 선택하지 않아도 바로 끌어서 옮긴다(vis 기본은 선택된 것만 끌림).
itemsAlwaysDraggable: { item: canManage, range: canManage },
// 끌 때 날짜 칸 단위로만 움직인다 — 가장 가까운 날 0시에 붙인다(vis 기본은 반나절 단위라
// 칸 가운데에 걸렸다가 놓으면 다음 날로 넘어갔다). 저장도 onMove 가 일 단위로 한다.
snap: function (date) {
const d = new Date(new Date(date).getTime() + 12 * 3600000);
d.setHours(0, 0, 0, 0);
return d;
},
format: {
minorLabels: function (date, scale) {
const d = new Date(date.valueOf());