fix: focused MIDI item notes brighter than siblings
This commit is contained in:
@@ -6289,9 +6289,10 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, activeTracks, onClos
|
||||
const w = Math.max(2, (snapEnd - snapStart) * pixelsPerBeat);
|
||||
const isSelected = selectedNoteIds.includes(note.id);
|
||||
|
||||
// Draw background of note
|
||||
ctx.fillStyle = isSelected ? 'rgba(59, 130, 246, 0.5)' : 'rgba(234, 179, 8, 0.5)';
|
||||
ctx.strokeStyle = isSelected ? '#3b82f6' : '#f59e0b';
|
||||
// Draw background of note (focused item = brighter)
|
||||
const playingNow = st.isPlaying;
|
||||
ctx.fillStyle = isSelected ? 'rgba(96, 165, 250, 0.6)' : (playingNow ? 'rgba(254, 240, 138, 0.75)' : 'rgba(253, 224, 71, 0.6)');
|
||||
ctx.strokeStyle = isSelected ? '#60a5fa' : (playingNow ? '#fef08a' : '#fde047');
|
||||
ctx.lineWidth = isSelected ? 1.5 : 1.2;
|
||||
ctx.fillRect(x + 1, y + 1, w - 2, NoteHeight - 2);
|
||||
ctx.strokeRect(x + 1, y + 1, w - 2, NoteHeight - 2);
|
||||
@@ -6299,7 +6300,7 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, activeTracks, onClos
|
||||
// Draw velocity layer (solid yellow/blue bar inside, proportional to velocity)
|
||||
const vel = note.velocity !== undefined ? note.velocity : 0.8;
|
||||
const velW = Math.max(2, (w - 2) * vel);
|
||||
ctx.fillStyle = isSelected ? '#3b82f6' : '#eab308';
|
||||
ctx.fillStyle = isSelected ? '#60a5fa' : (playingNow ? '#fde047' : '#facc15');
|
||||
ctx.fillRect(x + 1, y + 1, velW, NoteHeight - 2);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user