fix: read scrollLeft from DOM wrapper for canvas sync

Canvas effects now find nearest scrollable ancestor and read
scrollLeft directly, bypassing React prop latency during auto-scroll.
Applies to TempoTrackLane, WaveformLane, TimelineRuler.
This commit is contained in:
2026-07-25 11:09:20 +07:00
parent 5bd61516aa
commit c397545383
3 changed files with 38 additions and 6 deletions
+6
View File
@@ -92,6 +92,12 @@
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-25 11:09] Task: Fix TempoTrackLane scroll sync during drag auto-scroll
- **Tóm tắt thay đổi:** TempoTrackLane/WaveformLane/TimelineRuler hiện đọc scrollLeft trực tiếp từ DOM wrapper (canvases tìm parent scrollable) thay vì React prop. Tránh lệch vị trí khi auto-scroll nhanh trong clip drag do React state batching.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-25 11:04] Task: Fix PADDING_LEFT alignment + right-side bar rendering
- **Tóm tắt thay đổi:** Set PADDING_LEFT=0 trong TimelineRuler/WaveformLane/TempoTrackLane để grid column 0 khớp với clip position 0 (trước đây lệch 8px). TempoTrackLane dùng CLIP_BUFFER/zoom cho tEnd thay vì PADDING_LEFT để bar/beat vẽ đủ xa về phía phải khi scroll.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`