Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sigprogramming committed Jan 5, 2025
1 parent a7823aa commit 15ebc8a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sing/stateMachine/sequencerStateMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ type StoreActions = {

type Context = ComputedRefs & Refs & { readonly storeActions: StoreActions };

type State = IdleState | AddNoteState | MoveNoteState | ResizeNoteLeftState | ResizeNoteRightState;
type State =
| IdleState
| AddNoteState
| MoveNoteState
| ResizeNoteLeftState
| ResizeNoteRightState;

const getGuideLineTicks = (
cursorPos: PositionOnSequencer,
Expand Down Expand Up @@ -701,9 +706,10 @@ class ResizeNoteRightState implements IState<State, Input, Context> {
for (const note of previewNotes) {
const targetNoteAtStart = getOrThrow(targetNotesAtStart, note.id);
const notePos = targetNoteAtStart.position;
const noteEndPos = targetNoteAtStart.position + targetNoteAtStart.duration;
const noteEndPos =
targetNoteAtStart.position + targetNoteAtStart.duration;
const duration = Math.max(snapTicks, noteEndPos + movingTicks - notePos);

if (note.duration !== duration) {
editedNotes.set(note.id, { ...note, duration });
}
Expand Down

0 comments on commit 15ebc8a

Please sign in to comment.