fix: group drag uses original trackId for offset math
Store trackId in multiIds at drag start. Each item computes target from original track + crossOffset, immune to stale state from previous drag events. Track 1 item drags n tracks -> track 1+n, track 2 item -> track 2+n, etc.
This commit is contained in:
@@ -748,3 +748,9 @@
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
|
||||
---
|
||||
|
||||
### [2026-07-29 11:00] Task: Fix group drag — use ORIGINAL trackId from drag start
|
||||
- **Tóm tắt thay đổi:** Lưu `trackId: t.id` vào `multiIds` lúc bắt đầu drag. Dùng `inf.trackId` (original) để tính `origIdx + crossOffset` — không dùng `currentTrackMap` (live state có thể stale). Item track1 drag n track → track1+n, item track2+n track → track2+n.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user