You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Software version (please complete the following information):
Browser: chrome, firefox
Vue Version: ^3.0.0
vue-grid-layout Version: 3.0.0-beta1
Describe the bug
The grid item height isn't the actual amount of pixels as discribed in the documentation. According to the documentation the grid item heigth should be:
h
type: Number
required: true
Says what is a initial height of the item.
The value is a number that is multiplied by rowHeight.
Inspect the grid elements and note that the item height isn't correct.
The item heigth is here 72px while the expected heigth is: 30 * 2 = 60
The item heigth is here 112px while the expected heigth is: 30 * 3 = 90
The item heigth is here 152px while the expected heigth is: 30 * 4 = 120
Expected behavior
I expect the item height to be the actual calcalution the documentation describes: The value is a number that is multiplied by rowHeight
Additional info
I wanted to use the row height to calculate what the heigth of and grid element should be before adding it. Let's say I want to add a grid element for a picture I can calculate what the height of the picture should be depending on the grid width to preserve the aspect ratio. If I do such for example the width of a grid item is 100px and I cant to keep a 2x3 ratio the of the grid height should be 150px. But when I set a row height of 1px and a grid item height of 150 the actual height of the grid element is always a bit of like described in step 3.
The text was updated successfully, but these errors were encountered:
SamGeens
changed the title
rowHeight not the actual amount of pixels
Grid item heigth not the actual amount of pixels as described in the documentation
Sep 20, 2023
Software version (please complete the following information):
Describe the bug
The grid item height isn't the actual amount of pixels as discribed in the documentation. According to the documentation the grid item heigth should be:
To Reproduce
Steps to reproduce the behavior:
The item heigth is here 72px while the expected heigth is: 30 * 2 = 60
The item heigth is here 112px while the expected heigth is: 30 * 3 = 90
The item heigth is here 152px while the expected heigth is: 30 * 4 = 120
Expected behavior
I expect the item height to be the actual calcalution the documentation describes:
The value is a number that is multiplied by rowHeight
Additional info
I wanted to use the row height to calculate what the heigth of and grid element should be before adding it. Let's say I want to add a grid element for a picture I can calculate what the height of the picture should be depending on the grid width to preserve the aspect ratio. If I do such for example the width of a grid item is 100px and I cant to keep a 2x3 ratio the of the grid height should be 150px. But when I set a row height of 1px and a grid item height of 150 the actual height of the grid element is always a bit of like described in step 3.
The text was updated successfully, but these errors were encountered: