Skip to content

fix(rendering): start continued ties/slurs after clef on new systems - #2800

Draft
GiovanniSlabs wants to merge 2 commits into
CoderLine:developfrom
GiovanniSlabs:feature/tie-continuation-after-clef
Draft

fix(rendering): start continued ties/slurs after clef on new systems#2800
GiovanniSlabs wants to merge 2 commits into
CoderLine:developfrom
GiovanniSlabs:feature/tie-continuation-after-clef

Conversation

@GiovanniSlabs

Copy link
Copy Markdown

When a tie or slur continues on a new system, the curve segment started at the
very left edge of the staff, overlapping the clef and key signature. This PR
anchors the continuation start at the first bar renderer's beatGlyphsStart,
so it begins after the clef, key and time signatures as in standard engraving
practice.

Issues

Fixes #2799

Proposed changes

  • The final segment of a cross-system tie/slur (TieGlyph.doLayout,
    continuation branch) now starts at the end staff's first bar renderer
    beatGlyphsStart instead of the staff left edge. The anchor renderer was
    also switched from the start staff to the end staff, since the segment is
    painted on the end system.
  • The full-system segments of multi-system slurs
    (ContinuationTieGlyph.calculateStartX) use the same anchor.
  • Ties ending on the first beat of a system have their end X directly at the
    start of the beat area, so the continuation stub keeps a minimum length of
    2 staff spaces (smuflMetrics.oneStaffSpace) to stay visible. Happy to
    adjust if you prefer a different metric or approach for this minimum.
  • The 9 affected visual test references were regenerated via
    npm run test-accept-reference and visually reviewed; a new visual test
    (multi-system-tie-first-beat) covers the tie-ending-on-first-beat case.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website
acqua-before-zoom acqua-after-zoom

GiovanniSlabs and others added 2 commits July 28, 2026 12:00
When a tie or slur continues on a new system, the curve segment
started at the very left edge of the staff, overlapping the clef
and key signature. Anchor the continuation start at the first bar
renderer's beatGlyphsStart instead, so it begins after the clef,
key and time signatures as in standard engraving practice.

Applies to both the final segment (TieGlyph.doLayout) and the
full-system segments of multi-system slurs (ContinuationTieGlyph).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the case where a tie ends on the first beat of a new system:
the continuation stub must start after the clef and keep a minimum
visible length.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@GiovanniSlabs GiovanniSlabs changed the title Feature/tie continuation after clef fix(rendering): start continued ties/slurs after clef on new systems Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Continued ties/slurs on a new system start over the clef instead of after it

1 participant