From 4f6270489d459cef373e1715868c3e628da7bbfb Mon Sep 17 00:00:00 2001 From: Sri Panyam Date: Sun, 12 Sep 2021 23:27:44 -0700 Subject: [PATCH] Using minSize instead of minW and minH properties --- src/layouts.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/layouts.ts b/src/layouts.ts index 7877445..768fcd4 100644 --- a/src/layouts.ts +++ b/src/layouts.ts @@ -15,8 +15,7 @@ interface BeatViewDelegate { export interface BeatView { readonly beat: Beat; readonly needsLayout: boolean; - readonly minHeight: number; - readonly minWidth: number; + readonly minSize: TSU.Geom.Size; x: number; y: number; width: number; @@ -339,7 +338,7 @@ export class BeatLayout { beatView.refreshLayout(); currX += beatView.width; } - maxHeight = Math.max(maxHeight, beatView.minHeight); + maxHeight = Math.max(maxHeight, beatView.minSize.height); } currY += maxHeight; currY += this.roleSpacing; @@ -421,9 +420,9 @@ export class BeatColumn { this._maxWidth = 0; for (const beat of this.beats) { const beatView = beatViewDelegate.viewForBeat(beat); - const minWidth = beatView.minWidth; - if (minWidth > this._maxWidth) { - this._maxWidth = minWidth; + const minSize = beatView.minSize; + if (minSize.width > this._maxWidth) { + this._maxWidth = minSize.width; } } return this._maxWidth;