-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Max-width does not work as intended with resizable handle "w" #1330
Labels
Comments
JanStorm
changed the title
Max-width does not work as intended with resizable handle "sw"
Max-width does not work as intended with resizable handle "w"
Aug 13, 2020
Edited because of course this applies to all handles which goes to the left: 'sw', 'w' or 'nw' |
yep, thanks for the test case. |
Note to test in float.html, just change to this let grid = GridStack.init({float: true, resizable: { handles: 'sw' }});
...
{x: 3, y: 1, maxW: 2}, |
adumesny
added a commit
to adumesny/gridstack.js
that referenced
this issue
Dec 6, 2020
fix gridstack#1330 * we now set maxWidth/maxHeight to prevent grid item from resizing past their size * fixed code to prevent item from moving left when they reach max width * added sample test case
fix in upcoming 3.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
When using option resizable.handles 'sw', 'w' or 'nw' in combination with max-width, the widget can be dragged on x-axis instead of resizing, after we tried to make it further than the max-width property.
Your environment
Steps to reproduce
JSFiddle
When using this fiddle, just resize to the left.
The Widget with the number 2 is an example without maxwidth, so it work as intended ;)
https://jsfiddle.net/c5z2ywtn/4/
Expected behaviour
It should stop resizing at max width, like when using the default handle on the bottom right corner. And not even move, when trying to make bigger as max-width
Actual behaviour
it will move (with placeholder below) instead of resize (when being larger than the max-width), until the grid ends, and then only the draggable floats freely outside the grid, movable on the x-axis
The text was updated successfully, but these errors were encountered: