Shrink a clip with the wave and drop it with a click beside (#357)
Zoomed out, the wave left room above and below it, but the bright file, the picked clip and its handles still took the whole height. And a click in the wave beside the picked clip kept it picked, so only the strip could take it back to the sound. - fileReach in waveView.ts is how far up and down the file reaches: full scale and its inset, never past the area. At level 1 it is the whole height, zoomed in too. - The bright file, the shade outside the clip and the two handles are drawn within that reach. - A click over the wave beside the picked clip picks the sound. Inside the clip or on a handle nothing changes, and a drag still spans the clip anew. Tests: - Unit wave-view: 11 green (1 new), a counter-check red - e2e 34 (melektaus-atx): ALL PASSED, 91 checks (1 new) - Gate (melektaus-atx): CHECK EXIT 0, 271 files, 4195 tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42a3759d9d
commit
852dce5142
4 files changed
+53
-14
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
clampWave,
|
||||
draggedSpan,
|
||||
edgeAt,
|
||||
fileReach,
|
||||
fitWave,
|
||||
levelMarks,
|
||||
MAX_LEVEL,
|
||||
@@ -43,6 +44,13 @@ describe('the height of the wave (#357)', () => {
|
||||
expect(loud[0]).toBe(-24);
|
||||
expect(loud).not.toContain(0);
|
||||
});
|
||||
|
||||
it('lets the file and its clip reach as high as full scale zoomed out, never past the area', () => {
|
||||
// Full scale 100 px from the middle at level 1, 6 px inset, 106 px of room.
|
||||
expect(fileReach(1, 100, 6, 106)).toBe(106);
|
||||
expect(fileReach(0.25, 100, 6, 106)).toBe(31);
|
||||
expect(fileReach(4, 100, 6, 106)).toBe(106);
|
||||
});
|
||||
});
|
||||
|
||||
describe('the wave view', () => {
|
||||
|
||||
Reference in new issue
Block a user