Skip to content

Commit

Permalink
totalPx calculation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed May 19, 2021
1 parent f5f08f0 commit 276269e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ export abstract class Note extends Tickable {
this.leftDisplacedHeadPx - // subtract left displaced head
this.rightDisplacedHeadPx; // subtract right displaced head

const totalLeftPx = modLeftPx + this.leftDisplacedHeadPx;
const totalRightPx = modRightPx + this.rightDisplacedHeadPx;

return {
// ----------
// NOTE: If you change this, remember to update MockTickable in the tests/ directory.
Expand All @@ -597,8 +600,8 @@ export abstract class Note extends Tickable {
// Modifier spacing.
modLeftPx,
modRightPx,
totalLeftPx: 0,
totalRightPx: 0,
totalLeftPx,
totalRightPx,

// Displaced note head on left or right.
leftDisplacedHeadPx: this.leftDisplacedHeadPx,
Expand Down

0 comments on commit 276269e

Please sign in to comment.