From cfbaf89e1488f6cd3c1641825dce118ae1d044b0 Mon Sep 17 00:00:00 2001 From: johnwalley Date: Thu, 9 Feb 2023 15:12:07 +0000 Subject: [PATCH] fix: handle preferredSize correctly if unit is px --- src/pane-view/pane-view.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pane-view/pane-view.ts b/src/pane-view/pane-view.ts index 65457105..a0db49b9 100644 --- a/src/pane-view/pane-view.ts +++ b/src/pane-view/pane-view.ts @@ -116,7 +116,7 @@ export class PaneView implements View { this.layoutService ); } else if (endsWith(preferredSize, "px")) { - const pixels = Number(preferredSize.slice(0, -2)) / 100; + const pixels = Number(preferredSize.slice(0, -2)); this.layoutStrategy = new PixelLayout(pixels); } else if (typeof Number.parseFloat(preferredSize) === "number") {