diff --git a/src/elements/score.ts b/src/elements/score.ts index 682385de8..4a417e53d 100644 --- a/src/elements/score.ts +++ b/src/elements/score.ts @@ -70,7 +70,7 @@ export class Score { const partIndex = opts?.partIndex ?? 0; util.assert(0 <= partIndex && partIndex < partCount, 'partIndex out of bounds'); - const span = opts?.span ?? { fromPartIndex: 0, toPartIndex: 0 }; + const span = opts?.span ?? { fromPartIndex: 0, toPartIndex: partCount - 1 }; util.assert(0 <= span.fromPartIndex && span.fromPartIndex < partCount, 'fromPartIndex out of bounds'); util.assert(0 <= span.toPartIndex && span.toPartIndex < partCount, 'toPartIndex out of bounds'); util.assert(span.fromPartIndex <= span.toPartIndex, 'fromPartIndex must be less than or equal to toPartIndex'); diff --git a/src/rendering/fragment.ts b/src/rendering/fragment.ts index 57d50de25..09fa7000c 100644 --- a/src/rendering/fragment.ts +++ b/src/rendering/fragment.ts @@ -220,11 +220,14 @@ export class Fragment { ); } - const isLastSystem = this.document.isLastSystem(this.key); - const isLastMeasure = this.document.isLastMeasure(this.key); const isLastFragment = this.document.isLastFragment(this.key); + const endBarlineStyle = this.document.getMeasure(this.key).endBarlineStyle; if (isLastFragment) { - if (isLastSystem && isLastMeasure) { + if (endBarlineStyle === 'double') { + vexflowStaveConnectors.push( + new vexflow.StaveConnector(firstVexflowStave, lastVexflowStave).setType('thinDouble') + ); + } else if (endBarlineStyle === 'end' || endBarlineStyle === 'repeatend') { vexflowStaveConnectors.push( new vexflow.StaveConnector(firstVexflowStave, lastVexflowStave).setType('boldDoubleRight') ); diff --git a/tests/integration/__image_snapshots__/11b-TimeSignatures-NoTime_900px.png b/tests/integration/__image_snapshots__/11b-TimeSignatures-NoTime_900px.png index 7e0dd29d4..b9d26816c 100644 Binary files a/tests/integration/__image_snapshots__/11b-TimeSignatures-NoTime_900px.png and b/tests/integration/__image_snapshots__/11b-TimeSignatures-NoTime_900px.png differ diff --git a/tests/integration/__image_snapshots__/14a-StaffDetails-LineChanges_900px.png b/tests/integration/__image_snapshots__/14a-StaffDetails-LineChanges_900px.png index c8f81992b..a58579ff9 100644 Binary files a/tests/integration/__image_snapshots__/14a-StaffDetails-LineChanges_900px.png and b/tests/integration/__image_snapshots__/14a-StaffDetails-LineChanges_900px.png differ diff --git a/tests/integration/__image_snapshots__/41a-MultiParts-Partorder_900px.png b/tests/integration/__image_snapshots__/41a-MultiParts-Partorder_900px.png index d8229f244..737af8081 100644 Binary files a/tests/integration/__image_snapshots__/41a-MultiParts-Partorder_900px.png and b/tests/integration/__image_snapshots__/41a-MultiParts-Partorder_900px.png differ diff --git a/tests/integration/__image_snapshots__/43a-PianoStaff_900px.png b/tests/integration/__image_snapshots__/43a-PianoStaff_900px.png index c0ffd9ab6..c31aea039 100644 Binary files a/tests/integration/__image_snapshots__/43a-PianoStaff_900px.png and b/tests/integration/__image_snapshots__/43a-PianoStaff_900px.png differ diff --git a/tests/integration/__image_snapshots__/complex_formatting_900px.png b/tests/integration/__image_snapshots__/complex_formatting_900px.png index ba7efe808..d1b0d6a34 100644 Binary files a/tests/integration/__image_snapshots__/complex_formatting_900px.png and b/tests/integration/__image_snapshots__/complex_formatting_900px.png differ diff --git a/tests/integration/__image_snapshots__/prelude_no_1_snippet_900px.png b/tests/integration/__image_snapshots__/prelude_no_1_snippet_900px.png index 3ab2eec78..f7c3e1b9d 100644 Binary files a/tests/integration/__image_snapshots__/prelude_no_1_snippet_900px.png and b/tests/integration/__image_snapshots__/prelude_no_1_snippet_900px.png differ diff --git a/tests/integration/__image_snapshots__/tabs_with_stave_900px.png b/tests/integration/__image_snapshots__/tabs_with_stave_900px.png index 1115de650..58b779bba 100644 Binary files a/tests/integration/__image_snapshots__/tabs_with_stave_900px.png and b/tests/integration/__image_snapshots__/tabs_with_stave_900px.png differ