diff --git a/src/platform/svg/CssFontSvgCanvas.ts b/src/platform/svg/CssFontSvgCanvas.ts index 5c4463154..18460721d 100644 --- a/src/platform/svg/CssFontSvgCanvas.ts +++ b/src/platform/svg/CssFontSvgCanvas.ts @@ -46,7 +46,7 @@ export class CssFontSvgCanvas extends SvgCanvas { symbols: string, centerAtPosition: boolean = false ): void { - this.buffer += ` Duration.Quarter || isGrace) { - let glyph: BeamGlyph = new BeamGlyph(beatLineX - this.scale / 2, beamY, beat.duration, direction, isGrace); + if (h.hasFlag) { + let glyph: FlagGlyph = new FlagGlyph(beatLineX - this.scale / 2, beamY, beat.duration, direction, isGrace); glyph.renderer = this; glyph.doLayout(); glyph.paint(cx + this.x, cy + this.y, canvas); @@ -630,18 +627,6 @@ export class ScoreBarRenderer extends BarRendererBase implements IBeamYCalculato this.createTimeSignatureGlyphs(); } this.addPreBeatGlyph(new BarNumberGlyph(0, this.getScoreY(-0.5, 0), this.bar.index + 1)); - if (this.bar.isEmpty) { - this.addPreBeatGlyph(new SpacingGlyph(0, 0, 30 * this.scale)); - } - } - - protected createBeatGlyphs(): void { - for (let v: number = 0; v < this.bar.voices.length; v++) { - let voice: Voice = this.bar.voices[v]; - if (this.hasVoiceContainer(voice)) { - this.createVoiceGlyphs(voice); - } - } } protected createPostBeatGlyphs(): void { @@ -742,7 +727,7 @@ export class ScoreBarRenderer extends BarRendererBase implements IBeamYCalculato ); } - private createVoiceGlyphs(v: Voice): void { + protected createVoiceGlyphs(v: Voice): void { for (let i: number = 0, j: number = v.beats.length; i < j; i++) { let b: Beat = v.beats[i]; let container: ScoreBeatContainerGlyph = new ScoreBeatContainerGlyph(b, this.getOrCreateVoiceContainer(v)); diff --git a/src/rendering/TabBarRenderer.ts b/src/rendering/TabBarRenderer.ts index 469c5d5a7..96d2d5860 100644 --- a/src/rendering/TabBarRenderer.ts +++ b/src/rendering/TabBarRenderer.ts @@ -9,7 +9,7 @@ import { ICanvas, TextAlign } from '@src/platform/ICanvas'; import { BarRendererBase, NoteYPosition } from '@src/rendering/BarRendererBase'; import { BarNumberGlyph } from '@src/rendering/glyphs/BarNumberGlyph'; import { BarSeperatorGlyph } from '@src/rendering/glyphs/BarSeperatorGlyph'; -import { BeamGlyph } from '@src/rendering/glyphs/BeamGlyph'; +import { FlagGlyph } from '@src/rendering/glyphs/FlagGlyph'; import { BeatGlyphBase } from '@src/rendering/glyphs/BeatGlyphBase'; import { RepeatCloseGlyph } from '@src/rendering/glyphs/RepeatCloseGlyph'; import { RepeatCountGlyph } from '@src/rendering/glyphs/RepeatCountGlyph'; @@ -107,9 +107,6 @@ export class TabBarRenderer extends BarRendererBase { this.createTimeSignatureGlyphs(); } this.addPreBeatGlyph(new BarNumberGlyph(0, this.getTabY(-0.5, 0), this.bar.index + 1)); - if (this.bar.isEmpty) { - this.addPreBeatGlyph(new SpacingGlyph(0, 0, 30 * this.scale)); - } } private _startSpacing: boolean = false; @@ -135,16 +132,7 @@ export class TabBarRenderer extends BarRendererBase { ); } - protected createBeatGlyphs(): void { - for (let v: number = 0; v < this.bar.voices.length; v++) { - let voice: Voice = this.bar.voices[v]; - if (this.hasVoiceContainer(voice)) { - this.createVoiceGlyphs(this.bar.voices[v]); - } - } - } - - private createVoiceGlyphs(v: Voice): void { + protected createVoiceGlyphs(v: Voice): void { for (let i: number = 0, j: number = v.beats.length; i < j; i++) { let b: Beat = v.beats[i]; let container: TabBeatContainerGlyph = new TabBeatContainerGlyph(b, this.getOrCreateVoiceContainer(v)); @@ -527,10 +515,10 @@ export class TabBarRenderer extends BarRendererBase { canvas.lineTo(cx + this.x + beatLineX, y2); canvas.stroke(); // - // Draw beam + // Draw Flag // if (beat.duration > Duration.Quarter) { - let glyph: BeamGlyph = new BeamGlyph(0, 0, beat.duration, BeamDirection.Down, false); + let glyph: FlagGlyph = new FlagGlyph(0, 0, beat.duration, BeamDirection.Down, false); glyph.renderer = this; glyph.doLayout(); glyph.paint(cx + this.x + beatLineX, y2, canvas); diff --git a/src/rendering/glyphs/AccidentalGroupGlyph.ts b/src/rendering/glyphs/AccidentalGroupGlyph.ts index 10c41bec4..9e027a59a 100644 --- a/src/rendering/glyphs/AccidentalGroupGlyph.ts +++ b/src/rendering/glyphs/AccidentalGroupGlyph.ts @@ -9,10 +9,8 @@ class AccidentalColumnInfo { } export class AccidentalGroupGlyph extends GlyphGroup { - private _isGrace:boolean; - public constructor(isGrace:boolean) { + public constructor() { super(0, 0); - this._isGrace = isGrace; } public doLayout(): void { @@ -63,23 +61,17 @@ export class AccidentalGroupGlyph extends GlyphGroup { // // Place accidentals in columns // - let padding: number = 2 * this.scale; this.width = 0; for (const column of columns) { this.width += column.width; column.x = this.width; } - this.width += padding; for (let i: number = 0, j: number = this.glyphs.length; i < j; i++) { let g: Glyph = this.glyphs[i]; const column = columns[g.x]; - g.x = padding + (this.width - column.x); - } - - if(this._isGrace) { - this.width += padding; + g.x = (this.width - column.x); } } } diff --git a/src/rendering/glyphs/BeatContainerGlyph.ts b/src/rendering/glyphs/BeatContainerGlyph.ts index f53e35ab7..dcea65044 100644 --- a/src/rendering/glyphs/BeatContainerGlyph.ts +++ b/src/rendering/glyphs/BeatContainerGlyph.ts @@ -10,6 +10,7 @@ import { BarLayoutingInfo } from '@src/rendering/staves/BarLayoutingInfo'; import { BarBounds } from '../utils/BarBounds'; import { BeatBounds } from '../utils/BeatBounds'; import { Bounds } from '../utils/Bounds'; +import { FlagGlyph } from './FlagGlyph'; export class BeatContainerGlyph extends Glyph { public voiceContainer: VoiceContainerGlyph; @@ -32,13 +33,16 @@ export class BeatContainerGlyph extends Glyph { public registerLayoutingInfo(layoutings: BarLayoutingInfo): void { let preBeatStretch: number = this.onTimeX; - let postBeatStretch: number = 0; - for (let tie of this.ties) { - if (tie.width > postBeatStretch) { - postBeatStretch = tie.width; - } + let postBeatStretch: number = this.onNotes.width - this.onNotes.centerX; + // make space for flag + const helper = this.renderer.helpers.getBeamingHelperForBeat(this.beat); + if(helper && helper.hasFlag) { + postBeatStretch += FlagGlyph.FlagWidth * this.scale; } - postBeatStretch += this.onNotes.x + (this.onNotes.width - this.onNotes.centerX); + for(const tie of this.ties) { + postBeatStretch += tie.width; + } + layoutings.addBeatSpring(this.beat, preBeatStretch, postBeatStretch); // store sizes for special renderers like the EffectBarRenderer layoutings.setPreBeatSize(this.beat, this.preNotes.width); @@ -124,41 +128,41 @@ export class BeatContainerGlyph extends Glyph { return; } canvas.beginGroup(BeatContainerGlyph.getGroupId(this.beat)); - // var c = canvas.Color; - // var ta = canvas.TextAlign; - // canvas.Color = new Color(255, 0, 0); - // canvas.TextAlign = TextAlign.Left; - // canvas.FillText(Beat.DisplayStart.ToString(), cx + X, cy + Y - 10); - // canvas.Color = c; - // canvas.TextAlign = ta; - // canvas.Color = Color.Random(); - // canvas.FillRect(cx + X, cy + Y, Width, Renderer.Height); - // var oldColor = canvas.Color; - // canvas.Color = new Color((byte)Platform.Platform.Random(255), (byte)Platform.Platform.Random(255), (byte)Platform.Platform.Random(255), 100); - // canvas.FillRect(cx + X, cy + Y, Width, Renderer.Height); - // canvas.Color = oldColor; - // canvas.Color = new Color(200, 0, 0, 100); - // canvas.StrokeRect(cx + X, cy + Y + 15 * Beat.Voice.Index, Width, 10); - // canvas.Font = new Font("Arial", 10); - // canvas.Color = new Color(0, 0, 0); - // canvas.FillText(Beat.Voice.Index + ":" + Beat.Index, cx + X, cy + Y + 15 * Beat.Voice.Index); - // if (Beat.Voice.Index===0) - // { - // canvas.Color = new Color(200, 0, 0, 100); - // canvas.StrokeRect(cx + X, cy + Y + PreNotes.Y + 30, Width, 10); + // var c = canvas.color; + // var ta = canvas.textAlign; + // canvas.color = new Color(255, 0, 0); + // canvas.textAlign = TextAlign.Left; + // canvas.fillText(this.beat.displayStart.toString(), cx + this.x, cy + this.y - 10); + // canvas.color = c; + // canvas.textAlign = ta; + // canvas.color = Color.random(); + // canvas.fillRect(cx + this.x, cy + this.y, this.width, this.renderer.height); + // var oldColor = canvas.color; + // canvas.color = Color.random(100); + // canvas.fillRect(cx + this.x, cy + this.y, this.width, this.renderer.height); + // canvas.color = oldColor; + // canvas.color = new Color(200, 0, 0, 100); + // canvas.strokeRect(cx + this.x, cy + this.y + 15 * this.beat.voice.index, this.width, 10); + // canvas.font = new Font("Arial", 10); + // canvas.color = new Color(0, 0, 0); + // canvas.fillText(this.beat.voice.index + ":" + this.beat.index, cx + this.x, cy + this.y + 15 * this.beat.voice.index); + + // if (this.beat.voice.index === 0) { + // canvas.color = new Color(200, 0, 0, 100); + // canvas.strokeRect(cx + this.x, cy + this.y + this.preNotes.y + 30, this.width, 10); // } + this.preNotes.paint(cx + this.x, cy + this.y, canvas); - // if (Beat.Voice.Index===0) - // { - // canvas.Color = new Color(200, 0, 0, 100); - // canvas.StrokeRect(cx + X + PreNotes.X, cy + Y + PreNotes.Y, PreNotes.Width, 10); + // if (this.beat.voice.index === 0) { + // canvas.color = new Color(200, 0, 0, 100); + // canvas.strokeRect(cx + this.x + this.preNotes.x, cy + this.y + this.preNotes.y, this.preNotes.width, 10); // } this.onNotes.paint(cx + this.x, cy + this.y, canvas); - // if (Beat.Voice.Index===0) - // { - // canvas.Color = new Color(0, 200, 0, 100); - // canvas.StrokeRect(cx + X + OnNotes.X, cy + Y + OnNotes.Y + 10, OnNotes.Width, 10); + // if (this.beat.voice.index === 0) { + // canvas.color = new Color(0, 200, 0, 100); + // canvas.strokeRect(cx + this.x + this.onNotes.x, cy + this.y + this.onNotes.y - 10, this.onNotes.width, 10); // } + // paint the ties relative to the whole staff, // reason: we have possibly multiple staves involved and need to calculate the correct positions. let staffX: number = cx - this.voiceContainer.x - this.renderer.x; @@ -171,7 +175,7 @@ export class BeatContainerGlyph extends Glyph { canvas.endGroup(); } - public buildBoundingsLookup(barBounds:BarBounds, cx:number, cy:number, isEmptyBar:boolean) { + public buildBoundingsLookup(barBounds: BarBounds, cx: number, cy: number, isEmptyBar: boolean) { let beatBoundings: BeatBounds = new BeatBounds(); beatBoundings.beat = this.beat; beatBoundings.visualBounds = new Bounds(); @@ -192,7 +196,7 @@ export class BeatContainerGlyph extends Glyph { } barBounds.addBeat(beatBoundings); - if(this.renderer.settings.core.includeNoteBounds) { + if (this.renderer.settings.core.includeNoteBounds) { this.onNotes.buildBoundingsLookup(beatBoundings, cx + this.x, cy + this.y); } } diff --git a/src/rendering/glyphs/BendNoteHeadGroupGlyph.ts b/src/rendering/glyphs/BendNoteHeadGroupGlyph.ts index c394bd87f..903f091bc 100644 --- a/src/rendering/glyphs/BendNoteHeadGroupGlyph.ts +++ b/src/rendering/glyphs/BendNoteHeadGroupGlyph.ts @@ -17,7 +17,7 @@ export class BendNoteHeadGroupGlyph extends ScoreNoteChordGlyphBase { private _beat: Beat; private _showParenthesis: boolean = false; private _noteValueLookup: Map = new Map(); - private _accidentals: AccidentalGroupGlyph = new AccidentalGroupGlyph(true); + private _accidentals: AccidentalGroupGlyph = new AccidentalGroupGlyph(); private _preNoteParenthesis: GhostNoteContainerGlyph | null = null; private _postNoteParenthesis: GhostNoteContainerGlyph | null = null; public isEmpty: boolean = true; @@ -87,6 +87,7 @@ export class BendNoteHeadGroupGlyph extends ScoreNoteChordGlyphBase { x += this._preNoteParenthesis!.width + BendNoteHeadGroupGlyph.ElementPadding * this.scale; } if (!this._accidentals.isEmpty) { + x += this._accidentals.width + BendNoteHeadGroupGlyph.ElementPadding * this.scale; this._accidentals.x = x; this._accidentals.renderer = this.renderer; this._accidentals.doLayout(); diff --git a/src/rendering/glyphs/BeamGlyph.ts b/src/rendering/glyphs/FlagGlyph.ts similarity index 93% rename from src/rendering/glyphs/BeamGlyph.ts rename to src/rendering/glyphs/FlagGlyph.ts index cfde9247d..f7408473d 100644 --- a/src/rendering/glyphs/BeamGlyph.ts +++ b/src/rendering/glyphs/FlagGlyph.ts @@ -4,9 +4,11 @@ import { MusicFontSymbol } from '@src/rendering/glyphs/MusicFontSymbol'; import { BeamDirection } from '@src/rendering/utils/BeamDirection'; import { NoteHeadGlyph } from '@src/rendering/glyphs/NoteHeadGlyph'; -export class BeamGlyph extends MusicFontGlyph { +export class FlagGlyph extends MusicFontGlyph { + public static readonly FlagWidth:number = 11; + public constructor(x: number, y: number, duration: Duration, direction: BeamDirection, isGrace: boolean) { - super(x, y, isGrace ? NoteHeadGlyph.GraceScale : 1, BeamGlyph.getSymbol(duration, direction, isGrace)); + super(x, y, isGrace ? NoteHeadGlyph.GraceScale : 1, FlagGlyph.getSymbol(duration, direction, isGrace)); } public doLayout(): void { diff --git a/src/rendering/glyphs/NoteHeadGlyph.ts b/src/rendering/glyphs/NoteHeadGlyph.ts index 6b15c88ec..71f0b125b 100644 --- a/src/rendering/glyphs/NoteHeadGlyph.ts +++ b/src/rendering/glyphs/NoteHeadGlyph.ts @@ -34,7 +34,7 @@ export class NoteHeadGlyph extends MusicFontGlyph { this.width = 14 * (this._isGrace ? NoteHeadGlyph.GraceScale : 1) * this.scale; break; default: - this.width = 10 * (this._isGrace ? NoteHeadGlyph.GraceScale : 1) * this.scale; + this.width = NoteHeadGlyph.QuarterNoteHeadWidth * (this._isGrace ? NoteHeadGlyph.GraceScale : 1) * this.scale; break; } this.height = NoteHeadGlyph.NoteHeadHeight * scale; diff --git a/src/rendering/glyphs/ScoreBeatPreNotesGlyph.ts b/src/rendering/glyphs/ScoreBeatPreNotesGlyph.ts index e0b0cbe8c..4df665203 100644 --- a/src/rendering/glyphs/ScoreBeatPreNotesGlyph.ts +++ b/src/rendering/glyphs/ScoreBeatPreNotesGlyph.ts @@ -25,7 +25,7 @@ export class ScoreBeatPreNotesGlyph extends BeatGlyphBase { public doLayout(): void { if (!this.container.beat.isRest) { - let accidentals: AccidentalGroupGlyph = new AccidentalGroupGlyph(this.container.beat.graceType != GraceType.None); + let accidentals: AccidentalGroupGlyph = new AccidentalGroupGlyph(); let ghost: GhostNoteContainerGlyph = new GhostNoteContainerGlyph(true); ghost.renderer = this.renderer; this._prebends = new BendNoteHeadGroupGlyph(this.container.beat, true); @@ -84,12 +84,19 @@ export class ScoreBeatPreNotesGlyph extends BeatGlyphBase { } if (!accidentals.isEmpty) { this.accidentals = accidentals; + this.addGlyph( + new SpacingGlyph( + 0, + 0, + 2 * (this.container.beat.graceType !== GraceType.None ? NoteHeadGlyph.GraceScale : 1) * this.scale + ) + ); this.addGlyph(accidentals); this.addGlyph( new SpacingGlyph( 0, 0, - 4 * (this.container.beat.graceType !== GraceType.None ? NoteHeadGlyph.GraceScale : 1) * this.scale + 2 * (this.container.beat.graceType !== GraceType.None ? NoteHeadGlyph.GraceScale : 1) * this.scale ) ); } diff --git a/src/rendering/glyphs/ScoreNoteChordGlyphBase.ts b/src/rendering/glyphs/ScoreNoteChordGlyphBase.ts index 0f88ec83f..3d59524c3 100644 --- a/src/rendering/glyphs/ScoreNoteChordGlyphBase.ts +++ b/src/rendering/glyphs/ScoreNoteChordGlyphBase.ts @@ -86,7 +86,7 @@ export abstract class ScoreNoteChordGlyphBase extends Glyph { } g.x += this.noteStartX; lastLine = this._infos[i].line; - w = Math.max(w, g.x + g.width - lineOffset); + w = Math.max(w, g.x + g.width); } if (anyDisplaced) { this._noteHeadPadding = 0; @@ -95,7 +95,7 @@ export abstract class ScoreNoteChordGlyphBase extends Glyph { } else { this._noteHeadPadding = direction === BeamDirection.Down ? -displacedX : 0; w += this._noteHeadPadding; - this.upLineX = w; + this.upLineX = w - lineOffset; this.downLineX = 0; } this.displacedX = displacedX; diff --git a/src/rendering/glyphs/VoiceContainerGlyph.ts b/src/rendering/glyphs/VoiceContainerGlyph.ts index 467cb5f4c..59bbcd650 100644 --- a/src/rendering/glyphs/VoiceContainerGlyph.ts +++ b/src/rendering/glyphs/VoiceContainerGlyph.ts @@ -15,7 +15,6 @@ export class VoiceContainerGlyph extends GlyphGroup { public beatGlyphs: BeatContainerGlyph[]; public voice: Voice; - public minWidth: number = 0; public tupletGroups: TupletGroup[]; public constructor(x: number, y: number, voice: Voice) { @@ -84,17 +83,11 @@ export class VoiceContainerGlyph extends GlyphGroup { } public doLayout(): void { - this.minWidth = this.width; } - // private static Random Random = new Random(); public paint(cx: number, cy: number, canvas: ICanvas): void { - // canvas.Color = Color.Random(); - // canvas.StrokeRect(cx + X, cy + Y, Width, 100); - // if (Voice.Index===0) - // { - // PaintSprings(cx + X, cy + Y, canvas); - // } + // canvas.color = Color.random(); + // canvas.strokeRect(cx + this.x, cy + this.y, this.width, this.renderer.height); canvas.color = this.voice.index === 0 ? this.renderer.resources.mainGlyphColor diff --git a/src/rendering/staves/BarLayoutingInfo.ts b/src/rendering/staves/BarLayoutingInfo.ts index 0e4edafcf..1052f01c1 100644 --- a/src/rendering/staves/BarLayoutingInfo.ts +++ b/src/rendering/staves/BarLayoutingInfo.ts @@ -3,6 +3,7 @@ import { Beat } from '@src/model/Beat'; import { Duration } from '@src/model/Duration'; import { Spring } from '@src/rendering/staves/Spring'; import { ModelUtils } from '@src/model/ModelUtils'; +import { ICanvas } from '@src/platform/ICanvas'; /** * This public class stores size information about a stave. @@ -11,7 +12,7 @@ import { ModelUtils } from '@src/model/ModelUtils'; */ export class BarLayoutingInfo { private static readonly MinDuration: number = 30; - private static readonly MinDurationWidth: number = 10; + private static readonly MinDurationWidth: number = 7; private _timeSortedSprings: Spring[] = []; private _xMin: number = 0; @@ -82,10 +83,9 @@ export class BarLayoutingInfo { } } - public updateMinStretchForce(force: number): void { + private updateMinStretchForce(force: number): void { if (this.minStretchForce < force) { this.minStretchForce = force; - this.version++; } } @@ -175,13 +175,78 @@ export class BarLayoutingInfo { totalSpringConstant += 1 / currentSpring.springConstant; } this.totalSpringConstant = 1 / totalSpringConstant; + // calculate the force required to have at least the minimum size. + this.minStretchForce = 0; + // We take the space required between current and next spring + // and calculate the force needed so that the current spring + // reserves enough space + for (let i: number = 0; i < sortedSprings.length; i++) { - let force: number = sortedSprings[i].springWidth * sortedSprings[i].springConstant; - this.updateMinStretchForce(force); + let currentSpring = sortedSprings[i]; + let requiredSpace = 0; + + if (i === sortedSprings.length - 1) { + requiredSpace = currentSpring.postSpringWidth; + } else { + let nextSpring = sortedSprings[i + 1]; + requiredSpace = currentSpring.postSpringWidth + nextSpring.preSpringWidth; + } + + // for the first spring we need to ensure we take the initial + // pre-spring width into account + if (i === 0) { + requiredSpace += currentSpring.preSpringWidth; + } + + let requiredSpaceForce = requiredSpace * currentSpring.springConstant; + this.updateMinStretchForce(requiredSpaceForce); } } + public height: number = 0; + public paint(_cx: number, _cy: number, _canvas: ICanvas) {} + + // public height: number = 30; + // public paint(cx: number, cy: number, canvas: ICanvas) { + // let sortedSprings: Spring[] = this._timeSortedSprings; + // if (sortedSprings.length === 0) { + // return; + // } + + // const settings = canvas.settings; + // const force = Math.max(settings.display.stretchForce, this.minStretchForce); + + // const height = this.height * settings.display.scale; + // cy -= height; + + // canvas.color = settings.display.resources.mainGlyphColor; + // const font = settings.display.resources.effectFont.clone(); + // font.size *= 0.8; + // canvas.font = font; + // canvas.fillText(force.toFixed(2), cx, cy); + + // cy += settings.display.resources.effectFont.size * 1.5; + + // let springX: number = sortedSprings[0].preSpringWidth; + // for (let i: number = 0; i < sortedSprings.length; i++) { + // const spring = sortedSprings[i]; + + // canvas.color = new Color(0, 0, 255, 100); + // canvas.fillRect(cx + springX - spring.preSpringWidth, cy, spring.preSpringWidth, height / 2); + + // canvas.color = new Color(0, 255, 0, 100); + // canvas.fillRect(cx + springX, cy, spring.postSpringWidth, height / 2); + + // canvas.color = settings.display.resources.mainGlyphColor; + // canvas.moveTo(cx + springX, cy); + // canvas.lineTo(cx + springX, cy + height / 2); + // canvas.stroke(); + + // springX += this.calculateWidth(force, spring.springConstant); + // } + // } + private calculateSpringConstant(spring: Spring, duration: number): number { if (duration <= 0) { duration = MidiUtils.toTicks(Duration.SixtyFourth); @@ -190,7 +255,7 @@ export class BarLayoutingInfo { spring.smallestDuration = duration; } let minDuration: number = spring.smallestDuration; - let phi: number = 1 + 0.6 * Math.log2(duration / BarLayoutingInfo.MinDuration); + let phi: number = 1 + 0.85 * Math.log2(duration / BarLayoutingInfo.MinDuration); return (minDuration / duration) * (1 / (phi * BarLayoutingInfo.MinDurationWidth)); } @@ -199,7 +264,11 @@ export class BarLayoutingInfo { } public calculateVoiceWidth(force: number): number { - return this.calculateWidth(force, this.totalSpringConstant); + let width = this.calculateWidth(force, this.totalSpringConstant); + if(this._timeSortedSprings.length > 0) { + width += this._timeSortedSprings[0].preSpringWidth + } + return width; } public calculateWidth(force: number, springConstant: number): number { diff --git a/src/rendering/utils/BeamingHelper.ts b/src/rendering/utils/BeamingHelper.ts index c951b43e7..567b8421d 100644 --- a/src/rendering/utils/BeamingHelper.ts +++ b/src/rendering/utils/BeamingHelper.ts @@ -77,6 +77,15 @@ export class BeamingHelper { public preferredBeamDirection: BeamDirection | null = null; public isGrace: boolean = false; + public get hasLine(): boolean { + return this.beats.length === 1 && this.beats[0].duration > Duration.Whole; + } + + public get hasFlag(): boolean { + return this.beats.length === 1 && + (this.beats[0].duration > Duration.Quarter || this.beats[0].graceType != GraceType.None); + } + public constructor(staff: Staff) { this._staff = staff; this.beats = []; diff --git a/test-data/visual-tests/features/effects-and-annotations/bends.png b/test-data/visual-tests/features/effects-and-annotations/bends.png index 1aeaeb86f..afe6ed670 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/bends.png and b/test-data/visual-tests/features/effects-and-annotations/bends.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/brush.png b/test-data/visual-tests/features/effects-and-annotations/brush.png index cca0dd777..c6467a250 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/brush.png and b/test-data/visual-tests/features/effects-and-annotations/brush.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/chords.png b/test-data/visual-tests/features/effects-and-annotations/chords.png index 5e77da1c8..3bfc8ea13 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/chords.png and b/test-data/visual-tests/features/effects-and-annotations/chords.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/dynamics.png b/test-data/visual-tests/features/effects-and-annotations/dynamics.png index 20cc430c2..b14c8f6fc 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/dynamics.png and b/test-data/visual-tests/features/effects-and-annotations/dynamics.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/fade-in.png b/test-data/visual-tests/features/effects-and-annotations/fade-in.png index 576afd175..c0ded4531 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/fade-in.png and b/test-data/visual-tests/features/effects-and-annotations/fade-in.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/fingering.png b/test-data/visual-tests/features/effects-and-annotations/fingering.png index ed036927f..ca51fec36 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/fingering.png and b/test-data/visual-tests/features/effects-and-annotations/fingering.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/let-ring.png b/test-data/visual-tests/features/effects-and-annotations/let-ring.png index 6432f8867..90dc0ca1e 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/let-ring.png and b/test-data/visual-tests/features/effects-and-annotations/let-ring.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/markers.png b/test-data/visual-tests/features/effects-and-annotations/markers.png index d8cec7878..7f659654f 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/markers.png and b/test-data/visual-tests/features/effects-and-annotations/markers.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/palm-mute.png b/test-data/visual-tests/features/effects-and-annotations/palm-mute.png index 5264a1778..291579dbc 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/palm-mute.png and b/test-data/visual-tests/features/effects-and-annotations/palm-mute.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/pick-stroke.png b/test-data/visual-tests/features/effects-and-annotations/pick-stroke.png index fd4be4279..124b80c20 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/pick-stroke.png and b/test-data/visual-tests/features/effects-and-annotations/pick-stroke.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/slides.png b/test-data/visual-tests/features/effects-and-annotations/slides.png index e33c221b5..55be32cbb 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/slides.png and b/test-data/visual-tests/features/effects-and-annotations/slides.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tap.png b/test-data/visual-tests/features/effects-and-annotations/tap.png index 2dcb49df2..21d11a041 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tap.png and b/test-data/visual-tests/features/effects-and-annotations/tap.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tempo.png b/test-data/visual-tests/features/effects-and-annotations/tempo.png index d57ce3d73..38c4c8271 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tempo.png and b/test-data/visual-tests/features/effects-and-annotations/tempo.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/text.png b/test-data/visual-tests/features/effects-and-annotations/text.png index 5a9e79b71..6f2774534 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/text.png and b/test-data/visual-tests/features/effects-and-annotations/text.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tremolo-bar.png b/test-data/visual-tests/features/effects-and-annotations/tremolo-bar.png index 36675a994..b7d7789f8 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tremolo-bar.png and b/test-data/visual-tests/features/effects-and-annotations/tremolo-bar.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tremolo-picking.png b/test-data/visual-tests/features/effects-and-annotations/tremolo-picking.png index 9b5b7d0b8..f2dbccbab 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tremolo-picking.png and b/test-data/visual-tests/features/effects-and-annotations/tremolo-picking.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/trill.png b/test-data/visual-tests/features/effects-and-annotations/trill.png index da47bbdc7..518e3db1e 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/trill.png and b/test-data/visual-tests/features/effects-and-annotations/trill.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/triplet-feel.png b/test-data/visual-tests/features/effects-and-annotations/triplet-feel.png index 85451fad9..b52823ddb 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/triplet-feel.png and b/test-data/visual-tests/features/effects-and-annotations/triplet-feel.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tuplets-advanced.png b/test-data/visual-tests/features/effects-and-annotations/tuplets-advanced.png index 079dbd18c..bc1613c74 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tuplets-advanced.png and b/test-data/visual-tests/features/effects-and-annotations/tuplets-advanced.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/tuplets.png b/test-data/visual-tests/features/effects-and-annotations/tuplets.png index 038759d17..a9eb99496 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/tuplets.png and b/test-data/visual-tests/features/effects-and-annotations/tuplets.png differ diff --git a/test-data/visual-tests/features/effects-and-annotations/vibrato.png b/test-data/visual-tests/features/effects-and-annotations/vibrato.png index 05acb99ba..b543fdf8a 100644 Binary files a/test-data/visual-tests/features/effects-and-annotations/vibrato.png and b/test-data/visual-tests/features/effects-and-annotations/vibrato.png differ diff --git a/test-data/visual-tests/features/general/alternate-endings.png b/test-data/visual-tests/features/general/alternate-endings.png index 49847584d..c9fae28ec 100644 Binary files a/test-data/visual-tests/features/general/alternate-endings.png and b/test-data/visual-tests/features/general/alternate-endings.png differ diff --git a/test-data/visual-tests/features/general/notation-legend-default.png b/test-data/visual-tests/features/general/notation-legend-default.png index 300531f29..04a104360 100644 Binary files a/test-data/visual-tests/features/general/notation-legend-default.png and b/test-data/visual-tests/features/general/notation-legend-default.png differ diff --git a/test-data/visual-tests/features/general/notation-legend-songbook.png b/test-data/visual-tests/features/general/notation-legend-songbook.png index 68606f4e9..dcc7e7a2f 100644 Binary files a/test-data/visual-tests/features/general/notation-legend-songbook.png and b/test-data/visual-tests/features/general/notation-legend-songbook.png differ diff --git a/test-data/visual-tests/features/general/repeats.png b/test-data/visual-tests/features/general/repeats.png index 4bd1669d6..1dba2e8cf 100644 Binary files a/test-data/visual-tests/features/general/repeats.png and b/test-data/visual-tests/features/general/repeats.png differ diff --git a/test-data/visual-tests/features/general/song-details.png b/test-data/visual-tests/features/general/song-details.png index 1203273ce..efb8eda57 100644 Binary files a/test-data/visual-tests/features/general/song-details.png and b/test-data/visual-tests/features/general/song-details.png differ diff --git a/test-data/visual-tests/features/general/tuning.png b/test-data/visual-tests/features/general/tuning.png index ada832186..4cfd2ea8f 100644 Binary files a/test-data/visual-tests/features/general/tuning.png and b/test-data/visual-tests/features/general/tuning.png differ diff --git a/test-data/visual-tests/features/guitar-tabs/rhythm-with-beams.png b/test-data/visual-tests/features/guitar-tabs/rhythm-with-beams.png index 90be14ead..6dee8d404 100644 Binary files a/test-data/visual-tests/features/guitar-tabs/rhythm-with-beams.png and b/test-data/visual-tests/features/guitar-tabs/rhythm-with-beams.png differ diff --git a/test-data/visual-tests/features/guitar-tabs/rhythm.png b/test-data/visual-tests/features/guitar-tabs/rhythm.png index 302e8f11f..503f43383 100644 Binary files a/test-data/visual-tests/features/guitar-tabs/rhythm.png and b/test-data/visual-tests/features/guitar-tabs/rhythm.png differ diff --git a/test-data/visual-tests/features/guitar-tabs/string-variations.png b/test-data/visual-tests/features/guitar-tabs/string-variations.png index e8f1fb48c..068d641e6 100644 Binary files a/test-data/visual-tests/features/guitar-tabs/string-variations.png and b/test-data/visual-tests/features/guitar-tabs/string-variations.png differ diff --git a/test-data/visual-tests/features/layout/horizontal-layout-5to8.png b/test-data/visual-tests/features/layout/horizontal-layout-5to8.png index c55159c84..10c08a694 100644 Binary files a/test-data/visual-tests/features/layout/horizontal-layout-5to8.png and b/test-data/visual-tests/features/layout/horizontal-layout-5to8.png differ diff --git a/test-data/visual-tests/features/layout/horizontal-layout.png b/test-data/visual-tests/features/layout/horizontal-layout.png index 0d08a23c7..76e064555 100644 Binary files a/test-data/visual-tests/features/layout/horizontal-layout.png and b/test-data/visual-tests/features/layout/horizontal-layout.png differ diff --git a/test-data/visual-tests/features/layout/multi-track.png b/test-data/visual-tests/features/layout/multi-track.png index f4af76fad..565955ccf 100644 Binary files a/test-data/visual-tests/features/layout/multi-track.png and b/test-data/visual-tests/features/layout/multi-track.png differ diff --git a/test-data/visual-tests/features/layout/multi-voice.png b/test-data/visual-tests/features/layout/multi-voice.png index 000000382..bc2b516b6 100644 Binary files a/test-data/visual-tests/features/layout/multi-voice.png and b/test-data/visual-tests/features/layout/multi-voice.png differ diff --git a/test-data/visual-tests/features/layout/page-layout-5barsperrow.png b/test-data/visual-tests/features/layout/page-layout-5barsperrow.png index 20c5df2e8..4ea5aec7e 100644 Binary files a/test-data/visual-tests/features/layout/page-layout-5barsperrow.png and b/test-data/visual-tests/features/layout/page-layout-5barsperrow.png differ diff --git a/test-data/visual-tests/features/layout/page-layout-5to8.png b/test-data/visual-tests/features/layout/page-layout-5to8.png index cb9edd681..4028b7b93 100644 Binary files a/test-data/visual-tests/features/layout/page-layout-5to8.png and b/test-data/visual-tests/features/layout/page-layout-5to8.png differ diff --git a/test-data/visual-tests/features/layout/page-layout.png b/test-data/visual-tests/features/layout/page-layout.png index a51126f5c..8ca5e16e8 100644 Binary files a/test-data/visual-tests/features/layout/page-layout.png and b/test-data/visual-tests/features/layout/page-layout.png differ diff --git a/test-data/visual-tests/features/music-notation/accidentals.png b/test-data/visual-tests/features/music-notation/accidentals.png index 308c38494..7e1cce3f3 100644 Binary files a/test-data/visual-tests/features/music-notation/accidentals.png and b/test-data/visual-tests/features/music-notation/accidentals.png differ diff --git a/test-data/visual-tests/features/music-notation/clefs.png b/test-data/visual-tests/features/music-notation/clefs.png index b092cba3a..c81058c9c 100644 Binary files a/test-data/visual-tests/features/music-notation/clefs.png and b/test-data/visual-tests/features/music-notation/clefs.png differ diff --git a/test-data/visual-tests/features/music-notation/forced-accidentals.png b/test-data/visual-tests/features/music-notation/forced-accidentals.png index ffb45a0ed..9df271175 100644 Binary files a/test-data/visual-tests/features/music-notation/forced-accidentals.png and b/test-data/visual-tests/features/music-notation/forced-accidentals.png differ diff --git a/test-data/visual-tests/features/music-notation/key-signatures.png b/test-data/visual-tests/features/music-notation/key-signatures.png index 15372776b..a4efa4e29 100644 Binary files a/test-data/visual-tests/features/music-notation/key-signatures.png and b/test-data/visual-tests/features/music-notation/key-signatures.png differ diff --git a/test-data/visual-tests/features/music-notation/notes-rests-beams.png b/test-data/visual-tests/features/music-notation/notes-rests-beams.png index 7117ff4a2..6e2ec6662 100644 Binary files a/test-data/visual-tests/features/music-notation/notes-rests-beams.png and b/test-data/visual-tests/features/music-notation/notes-rests-beams.png differ diff --git a/test-data/visual-tests/features/music-notation/time-signatures.png b/test-data/visual-tests/features/music-notation/time-signatures.png index d0cbce33c..b42f4fe3d 100644 Binary files a/test-data/visual-tests/features/music-notation/time-signatures.png and b/test-data/visual-tests/features/music-notation/time-signatures.png differ diff --git a/test-data/visual-tests/features/notation-elements/chord-diagrams-off.png b/test-data/visual-tests/features/notation-elements/chord-diagrams-off.png index fda8ffcda..f9eae692c 100644 Binary files a/test-data/visual-tests/features/notation-elements/chord-diagrams-off.png and b/test-data/visual-tests/features/notation-elements/chord-diagrams-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/chord-diagrams-on.png b/test-data/visual-tests/features/notation-elements/chord-diagrams-on.png index 77e7b796c..1504cb388 100644 Binary files a/test-data/visual-tests/features/notation-elements/chord-diagrams-on.png and b/test-data/visual-tests/features/notation-elements/chord-diagrams-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/effects-off.png b/test-data/visual-tests/features/notation-elements/effects-off.png index 100d6cb27..799ee6cd3 100644 Binary files a/test-data/visual-tests/features/notation-elements/effects-off.png and b/test-data/visual-tests/features/notation-elements/effects-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/effects-on.png b/test-data/visual-tests/features/notation-elements/effects-on.png index 9d12c2189..9cff8ac41 100644 Binary files a/test-data/visual-tests/features/notation-elements/effects-on.png and b/test-data/visual-tests/features/notation-elements/effects-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/guitar-tuning-off.png b/test-data/visual-tests/features/notation-elements/guitar-tuning-off.png index 2fbf13f3d..b32f28e42 100644 Binary files a/test-data/visual-tests/features/notation-elements/guitar-tuning-off.png and b/test-data/visual-tests/features/notation-elements/guitar-tuning-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/guitar-tuning-on.png b/test-data/visual-tests/features/notation-elements/guitar-tuning-on.png index 0c6573f44..1e1b761cb 100644 Binary files a/test-data/visual-tests/features/notation-elements/guitar-tuning-on.png and b/test-data/visual-tests/features/notation-elements/guitar-tuning-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-off.png b/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-off.png index 8136b41cb..a1ed7bfc8 100644 Binary files a/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-off.png and b/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-on.png b/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-on.png index f7ed5952b..624ac1c69 100644 Binary files a/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-on.png and b/test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-album.png b/test-data/visual-tests/features/notation-elements/score-info-album.png index 21dfdda3b..5e60d1608 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-album.png and b/test-data/visual-tests/features/notation-elements/score-info-album.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-all.png b/test-data/visual-tests/features/notation-elements/score-info-all.png index fed896d98..5e3ad19f0 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-all.png and b/test-data/visual-tests/features/notation-elements/score-info-all.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-artist.png b/test-data/visual-tests/features/notation-elements/score-info-artist.png index 05c8f60bb..af5c90be2 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-artist.png and b/test-data/visual-tests/features/notation-elements/score-info-artist.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-copyright.png b/test-data/visual-tests/features/notation-elements/score-info-copyright.png index 854a81480..4e64dba26 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-copyright.png and b/test-data/visual-tests/features/notation-elements/score-info-copyright.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-music.png b/test-data/visual-tests/features/notation-elements/score-info-music.png index 3daf596b8..96a9ce02e 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-music.png and b/test-data/visual-tests/features/notation-elements/score-info-music.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-subtitle.png b/test-data/visual-tests/features/notation-elements/score-info-subtitle.png index 515628515..976c83a5e 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-subtitle.png and b/test-data/visual-tests/features/notation-elements/score-info-subtitle.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-title.png b/test-data/visual-tests/features/notation-elements/score-info-title.png index 612a19bcc..c3816aebd 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-title.png and b/test-data/visual-tests/features/notation-elements/score-info-title.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-words-and-music.png b/test-data/visual-tests/features/notation-elements/score-info-words-and-music.png index 1ab786e54..b58e34d88 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-words-and-music.png and b/test-data/visual-tests/features/notation-elements/score-info-words-and-music.png differ diff --git a/test-data/visual-tests/features/notation-elements/score-info-words.png b/test-data/visual-tests/features/notation-elements/score-info-words.png index 83b1ebd2d..743b49e41 100644 Binary files a/test-data/visual-tests/features/notation-elements/score-info-words.png and b/test-data/visual-tests/features/notation-elements/score-info-words.png differ diff --git a/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-off.png b/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-off.png index 5c4b2d6fe..477b43e1f 100644 Binary files a/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-off.png and b/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-on.png b/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-on.png index cb6273204..86644944d 100644 Binary files a/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-on.png and b/test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/track-names-off.png b/test-data/visual-tests/features/notation-elements/track-names-off.png index 458a3208d..e9c965ebd 100644 Binary files a/test-data/visual-tests/features/notation-elements/track-names-off.png and b/test-data/visual-tests/features/notation-elements/track-names-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/track-names-on (1).png b/test-data/visual-tests/features/notation-elements/track-names-on (1).png deleted file mode 100644 index 253b31bcd..000000000 Binary files a/test-data/visual-tests/features/notation-elements/track-names-on (1).png and /dev/null differ diff --git a/test-data/visual-tests/features/notation-elements/track-names-on.png b/test-data/visual-tests/features/notation-elements/track-names-on.png index 253b31bcd..d2bdd89dd 100644 Binary files a/test-data/visual-tests/features/notation-elements/track-names-on.png and b/test-data/visual-tests/features/notation-elements/track-names-on.png differ diff --git a/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-off.png b/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-off.png index 0724f06a0..a04fde8f3 100644 Binary files a/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-off.png and b/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-off.png differ diff --git a/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-on.png b/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-on.png index fe1494e16..da559e928 100644 Binary files a/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-on.png and b/test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-on.png differ diff --git a/test-data/visual-tests/features/special-notes/dead-notes.png b/test-data/visual-tests/features/special-notes/dead-notes.png index 20e3e957c..77fee479d 100644 Binary files a/test-data/visual-tests/features/special-notes/dead-notes.png and b/test-data/visual-tests/features/special-notes/dead-notes.png differ diff --git a/test-data/visual-tests/features/special-notes/ghost-notes.png b/test-data/visual-tests/features/special-notes/ghost-notes.png index 79e94063e..16b90744f 100644 Binary files a/test-data/visual-tests/features/special-notes/ghost-notes.png and b/test-data/visual-tests/features/special-notes/ghost-notes.png differ diff --git a/test-data/visual-tests/features/special-notes/grace-notes-advanced.png b/test-data/visual-tests/features/special-notes/grace-notes-advanced.png index 21b441d59..1139177ac 100644 Binary files a/test-data/visual-tests/features/special-notes/grace-notes-advanced.png and b/test-data/visual-tests/features/special-notes/grace-notes-advanced.png differ diff --git a/test-data/visual-tests/features/special-notes/grace-notes.png b/test-data/visual-tests/features/special-notes/grace-notes.png index b036d294b..bdfc79239 100644 Binary files a/test-data/visual-tests/features/special-notes/grace-notes.png and b/test-data/visual-tests/features/special-notes/grace-notes.png differ diff --git a/test-data/visual-tests/features/special-notes/tied-notes.png b/test-data/visual-tests/features/special-notes/tied-notes.png index 407995f9f..402ed2d55 100644 Binary files a/test-data/visual-tests/features/special-notes/tied-notes.png and b/test-data/visual-tests/features/special-notes/tied-notes.png differ diff --git a/test-data/visual-tests/features/special-tracks/drum-tabs.png b/test-data/visual-tests/features/special-tracks/drum-tabs.png index 5017f56aa..3a8fbcc16 100644 Binary files a/test-data/visual-tests/features/special-tracks/drum-tabs.png and b/test-data/visual-tests/features/special-tracks/drum-tabs.png differ diff --git a/test-data/visual-tests/features/special-tracks/grand-staff.png b/test-data/visual-tests/features/special-tracks/grand-staff.png index 2132d70a8..5c6bbf198 100644 Binary files a/test-data/visual-tests/features/special-tracks/grand-staff.png and b/test-data/visual-tests/features/special-tracks/grand-staff.png differ diff --git a/test/visualTests/VisualTestHelper.ts b/test/visualTests/VisualTestHelper.ts index 2c73301f6..4e54f5c46 100644 --- a/test/visualTests/VisualTestHelper.ts +++ b/test/visualTests/VisualTestHelper.ts @@ -337,7 +337,6 @@ export class VisualTestHelper { Diff:
`; - actual.ondblclick = () => { const a = document.createElement('a'); a.href = oldActual.toDataURL('image/png');