Skip to content

Commit

Permalink
fix: handle preferredSize correctly if unit is px (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwalley committed Feb 12, 2023
1 parent 5c05fd0 commit c02f059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pane-view/pane-view.ts
Expand Up @@ -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") {
Expand Down

0 comments on commit c02f059

Please sign in to comment.