-
-
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
Can't resize or move widgets in "responsive" mode #37
Comments
Hi, What do you mean in "responsive mode"? When the grid is collapsed into one column? Element that was repositioned/resized since what? You can subscribe on |
Yes, the same behavior can be seen on the official demo page. |
Yes, moving and resizing are disabled in one-column mode by design because Probably I can enable resizing in one-column mode, but I don't know how should dragging work. For instance we have a grid:
in one-column mode it will be like:
If you move |
Yep, I understand. |
Hi, I think this behaviour will be unclear. But I can add an ability to override the default behaviour. Right now I use a function which sorts DOM nodes and I will add it as an option. // sorry for late response. Crazy holidays time. |
What about setting some sort of rule such as transposing the 1 column mode to rows so if you have the 1 column like: 1 It would go to This will be dependent on the widget size, each row should fill the grid... If such rules are set then this should work to some extent... |
Hi Troole, I was pondering over the problem statement you gave on Dec 30, 2014. On analysis, we can find that the 'x' coordinates are getting translated into 'y' coordinates in the single column mode. So when we drag and drop .If you move [1] down to be below of [2], the 'y' coordinate of [1] should be translated to 'x' coordinate of [1]. Because, gridstack arranges the grid items on 'row basis', when resizing from normal mode to responsive mode, the same rules should work on the inverse side of the layout. Regards, |
With support from widget swapping / switching (ref: "#88" ) this should become easy. For example, once in vertical 1-column mode, two widgets can only "swap" their positions (and sizes), and hence when the grid goes back to normal state everything goes back to normal except the swapped widgets which go to their new swapped positions (and resized as per their target positions). |
It actually somehow relates to #174 |
How about not using 2 coordinates, but just one. It would be easier to change number of columns. |
I'm not confident that the swap answer is a good one. I don't think it's intuitive that the x-coordinates of two widgets will be swapped simply because these two were swapped in one column mode. I also don't think that it would be intuitive to drag widgets in single column mode, anyway. However, I could understand how a developer may want to programmatically create a way for another user to swap widgets. We shouldn't get in the way of this, but I don't think that gridstack should attempt to solve this problem. |
Apologies, but I'm moving this to |
Note to my future self: We will add an option to allow for moving and resizing widgets in one column mode, but these changes will not persist into multi-columns. We'll maintain separate sets of information for single-column mode. |
What I don't get why it is possible to resize in one-column-mode in this example: http://gridstackjs.com/demo/responsive.html Is it because it is 0.2.7-dev? So this would mean that this feature was (accidently) removed from 0.4.0 (I am just talking about resizing, not resort)!? |
Hi all - so you know I've commited a re-write of We could probably tweak this more. I have NOT looked at the oneColumnMode yet (I forgot about it when I was busy with the |
fixed with #1120 in v0.6.1 - full editing now in oneColumnMode (see https://gridstackjs.com/demo/responsive.html and https://gridstackjs.com/demo/column.html) as it now just uses |
I don't know if this is a bug or a feature, but inability to resize/move widgets in responsive mode is quite frustrating.
Also, how can I target the element that was repositioned/resized, I could parse items, but need to target only the element which was modified.
The text was updated successfully, but these errors were encountered: