CoderLine / alphaTab

alphaTab is a cross platform music notation and guitar tablature rendering library.
http://www.alphatab.net
Mozilla Public License 2.0
1.23k stars 199 forks source link

Effect Bands of reverted bars wrongly remember the height from the previous system. #1627

Closed goodgame365 closed 3 weeks ago

goodgame365 commented 4 weeks ago

Is there an existing issue for this?

Current Behavior

I found that the issue still exists in commit 996d08a7df052b0a5c3a95f0e9db686b975c57d2. This time, the rows below inherit the height of a certain effect from the row above, and the subsequent rows continue to inherit this height until a different effect is applied,As shown in the image: 未标题-1

未标题-3

Expected Behavior

I expect the effect to be as shown in the figure below 未标题-2

Steps To Reproduce

Please download this GTP file for testing test2.zip

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.4 (alpha) or 1.3.1

Platform

Web

Environment

Browser

Anything else?

No response

goodgame365 commented 3 weeks ago

I found that commenting out or deleting \src\rendering\EffectBarRenderer.ts the following line of code makes the program display correctly:

   private updateHeight(): boolean {
        if (!this.sizingInfo) {
            return false;
        }
        let y: number = 0;
        for (let slot of this.sizingInfo.slots) {
            slot.shared.y = y;
            for (let band of slot.bands) {
                band.y = y;
                **//  commenting out or deleting  the following line
                //band.height = slot.shared.height;**

However, the reason is unclear, as I'm not sure what the purpose of this assignment is.

未标题-1