diff --git a/src/components/piano-roll/PianoRollToolbar.test.tsx b/src/components/piano-roll/PianoRollToolbar.test.tsx index 8e16cf5..7e50a4f 100644 --- a/src/components/piano-roll/PianoRollToolbar.test.tsx +++ b/src/components/piano-roll/PianoRollToolbar.test.tsx @@ -130,10 +130,23 @@ describe('PianoRollToolbar', () => { expect(screen.getByRole('button', { name: 'Sheet Music View' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: /16,48/i })).toBeInTheDocument(); expect(screen.getByRole('button', { name: 'Show Entire Track' })).toBeInTheDocument(); + expect(screen.queryByRole('button', { name: '1x' })).not.toBeInTheDocument(); expect(screen.queryByRole('button', { name: 'Pointer Tool' })).not.toBeInTheDocument(); expect(screen.queryByRole('button', { name: /Pitch Bend/i })).not.toBeInTheDocument(); }); + it('shows the zoom button outside sheet mode', () => { + render( + + ); + + expect(screen.getByRole('button', { name: '1x' })).toBeInTheDocument(); + }); + it('toggles the full-track sheet scope button', () => { const onSheetMusicTrackScopeToggle = vi.fn(); diff --git a/src/components/piano-roll/PianoRollToolbar.tsx b/src/components/piano-roll/PianoRollToolbar.tsx index b9b6df0..3e8d8c5 100644 --- a/src/components/piano-roll/PianoRollToolbar.tsx +++ b/src/components/piano-roll/PianoRollToolbar.tsx @@ -256,28 +256,30 @@ const PianoRollToolbar: React.FC = ({ )} -
- - {showZoomSlider && ( -
- onZoomChange(parseInt(e.target.value))} - /> - {zoom}x -
- )} -
+ {!sheetMusicViewEnabled && ( +
+ + {showZoomSlider && ( +
+ onZoomChange(parseInt(e.target.value))} + /> + {zoom}x +
+ )} +
+ )} );