Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cellHeight=8rem" breaks during resize in 2.0.0 #1356

Closed
71GA opened this issue Sep 9, 2020 · 2 comments
Closed

"cellHeight=8rem" breaks during resize in 2.0.0 #1356

71GA opened this issue Sep 9, 2020 · 2 comments
Labels

Comments

@71GA
Copy link

71GA commented Sep 9, 2020

I migrated to Gridstack 2.0.0 and I noticed that relative units do not work for "cellHeight" anymore. Here is the minimal working example: https://jsitor.com/YYbJFy7UY

To reproduce... First run with line cellHeight: "8rem" comented and everything seems to work. But then uncomment it. You will see that positioning / placeholder don't work if line is not commented out.

@adumesny
Copy link
Member

adumesny commented Sep 9, 2020

here's the default example with cellHeight: "8rem" set which shows the issue when resizing (renders ok initially).
v 2.0.0
https://jsfiddle.net/adumesny/jqhkry7g/50/

vs 1.2.1 version which works during resize
https://jsfiddle.net/adumesny/jqhkry7g/53/

thanks for posting this!

@adumesny adumesny changed the title Gridstack v 2.0.0 -- relative units do not work for "cellHeight" "cellHeight=8rem" breaks during resize in 2.0.0 Sep 9, 2020
adumesny added a commit to adumesny/gridstack.js that referenced this issue Sep 26, 2020
* fix for gridstack#1356
* `getCellHeight(forcePixel = false)` now take optional arg to get pixel values,
which is needed during resize calculations
* texting with example with "6em" "6rem" "auto" "70" and "70px"
adumesny added a commit to adumesny/gridstack.js that referenced this issue Sep 26, 2020
* fix for gridstack#1356
* `getCellHeight(forcePixel = false)` now take optional arg to get pixel values,
which is needed during resize calculations
* texting with example with "6em" "6rem" "auto" "70" and "70px"
@adumesny
Copy link
Member

fixed in 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants