Skip to content

Commit

Permalink
[v8] Fix: Incorrect ScrollBox Bidirectional Vertical Flow
Browse files Browse the repository at this point in the history
  • Loading branch information
bbazukun123 committed May 21, 2024
1 parent 95c24ac commit 525d510
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export class List extends Container
*/
public arrangeChildren()
{
let maxHeight = 0;
let x = this.leftPadding;
let y = this.topPadding;

Expand Down Expand Up @@ -311,13 +312,15 @@ export class List extends Container

if (child.x + child.width > maxWidth && id > 0)
{
y += elementsMargin + child.height;
y += elementsMargin + maxHeight;
x = this.leftPadding;

child.x = x;
child.y = y;
maxHeight = 0;
}

maxHeight = Math.max(maxHeight, child.height);
x += elementsMargin + child.width;
break;
}
Expand Down

0 comments on commit 525d510

Please sign in to comment.