Skip to content

Commit

Permalink
feat: stop appending px to width and height (#37)
Browse files Browse the repository at this point in the history
Allow the width or height, depending on if scrolling horizontally or vertically, to be expressed as a percentage.

Co-authored-by: Alexander Sellström <[email protected]>
  • Loading branch information
jonasgeiler and rednaxela5950 authored Apr 20, 2024
1 parent 143ebb5 commit 738d6d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VirtualList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@
const totalSize = sizeAndPositionManager.getTotalSize();
if (scrollDirection === DIRECTION.VERTICAL) {
wrapperStyle = `height:${height}px;width:${width};`;
wrapperStyle = `height:${height};width:${width};`;
innerStyle = `flex-direction:column;height:${totalSize}px;`;
} else {
wrapperStyle = `height:${height};width:${width}px`;
wrapperStyle = `height:${height};width:${width}`;
innerStyle = `min-height:100%;width:${totalSize}px;`;
}
Expand Down

0 comments on commit 738d6d8

Please sign in to comment.