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

Resizing horizontally stretches intro wrong direction #1731

Closed
riccardolardi opened this issue Apr 14, 2021 · 6 comments
Closed

Resizing horizontally stretches intro wrong direction #1731

riccardolardi opened this issue Apr 14, 2021 · 6 comments

Comments

@riccardolardi
Copy link

Subject of the issue

Horizontal resizing extends on the oppsite side. Resizing a widget to the left extends its size to the right, and vice versa.

Your environment

Issue only happens from 4.0.1 upwards. 3.3.0 works fine!
Raspberry Pi OS, Electron/Chromium

Steps to reproduce

Video actual behaviour (bug from 4.0.1 onwards): https://streamable.com/kxykf4
Video expected behaviour (3.3.0 and below): https://streamable.com/v1y2pa

Find the code here: https://gist.github.com/riccardolardi/1a73c93d11b6486c26438fb77b9ed5d4

Expected behavior

Resizing to the left should extend the widget size to the left.

Actual behavior

Resizing to the left does extend the widget size to the right and vice versa. Vertical resizing (only South tested) works fine.

Thanks for your support.

@adumesny
Copy link
Member

do you see the same issue with https://gridstackjs.com/demo/mobile.html ?
if not then something in your app maybe.

or even https://gridstackjs.com/demo/float.html ? (modify to use jq version if that is what you use since you are on touch).

I can't debug your app, so you need to reproduce in a simple JS app.

@riccardolardi
Copy link
Author

riccardolardi commented Apr 16, 2021

Thanks @adumesny I've just modified the float demo to use jquery and to show all handles and the same issue happens. See video: https://streamable.com/eoq6er

@adumesny
Copy link
Member

top resize is known issue #1728 which I started looking at. your issue was with horizontal which I've never seen... left side resize issue was recently fixed. Right and bottom has never been an issue unlike your app video. Is that happening with simple demos ?

adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 18, 2021
* fix gridstack#1728 gridstack#1731
* we now fully support sizing from the top or left side of widgets
* changed float.html demo to have all sides sizing to test
@adumesny adumesny mentioned this issue Apr 18, 2021
3 tasks
@adumesny
Copy link
Member

though I was not able to reproduce your original issue, I believe I have fixed this (changed how we compute moves during resizing)

should fixed in next release. don't forget to contribute if you find lib useful!

@riccardolardi
Copy link
Author

@adumesny awesome! Any ETA for the next release?

@adumesny
Copy link
Member

now :)

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

No branches or pull requests

2 participants