From 80a535264548919bf79b1a89121fd03092feafd4 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Mon, 27 Jul 2026 21:38:23 +0700 Subject: [PATCH] feat: Ctrl+drag on ruler creates global selection handleRulerMouseDown's Ctrl+click branch previously only cleared selection. Now it sets selectionMode='global', records drag start, and enables isDraggingRulerRef so the existing document-level mousemove handler updates the selection range in real-time. --- wiki.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wiki.md b/wiki.md index a0ee527..682b553 100644 --- a/wiki.md +++ b/wiki.md @@ -497,3 +497,9 @@ - **Các file ảnh hưởng:** `app/static/js/app.jsx` (lines 6960-7040), `app/static/js/app.precompiled.js` - **Ghi chú/Test (nếu có):** `npm run build` pass. Cần test: ARM cả 2 track, bấm phím MIDI → cả 2 track đều phát ra instrument riêng. NoteOff gửi đúng channel. --- + +### [2026-07-27 21:37] Task: Ctrl+drag on ruler for global selection +- **Tóm tắt thay đổi:** `handleRulerMouseDown` cũ khi `e.ctrlKey` chỉ clear selection rồi return. Fix: Ctrl+click trên ruler khởi tạo `selectionMode='global'`, set `rulerDragStartRef` và `isDraggingRulerRef=true` → document mousemove handler (đã có sẵn) cập nhật selection range, selection overlay (đã render sẵn) hiển thị vùng chọn. +- **Các file ảnh hưởng:** `app/static/js/app.jsx` (line 11133-11142), `app/static/js/app.precompiled.js` +- **Ghi chú/Test (nếu có):** `npm run build` pass. Cần test: Ctrl+drag trên ruler → selection overlay xuất hiện. Shift+click vẫn extend selection. +---