From 0ff67c0c09fd8d2edf133fb2bf63476b49845794 Mon Sep 17 00:00:00 2001 From: Stefan Puchta Date: Wed, 3 Mar 2021 12:55:14 +0100 Subject: [PATCH] fix: correct calculation of height when using primary-size='auto' --- packages/split-view/package.json | 2 +- packages/split-view/src/SplitView.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/split-view/package.json b/packages/split-view/package.json index 840f15060e..7727d092be 100644 --- a/packages/split-view/package.json +++ b/packages/split-view/package.json @@ -18,7 +18,7 @@ "lit-element", "lit-html" ], - "version": "0.1.0", + "version": "0.1.1", "description": "", "main": "src/index.js", "module": "src/index.js", diff --git a/packages/split-view/src/SplitView.ts b/packages/split-view/src/SplitView.ts index 3f7e2607c6..9db30413b6 100644 --- a/packages/split-view/src/SplitView.ts +++ b/packages/split-view/src/SplitView.ts @@ -377,9 +377,9 @@ export class SplitView extends SpectrumElement { const size = window .getComputedStyle(firstEl) .getPropertyValue(this.vertical ? 'height' : 'width'); - const size_i = parseInt(size, 10); + const size_i = parseFloat(size); if (!isNaN(size_i)) { - return this.getLimitedPosition(size_i); + return this.getLimitedPosition(Math.ceil(size_i)); } } }