Gridstack.js: Disable/Enable Re-sizing/Dragging on active grid

Created on 9 Mar 2016  路  1Comment  路  Source: gridstack/gridstack.js

I have been looking everywhere for hours on how to disable and enable dragging/re-sizing on an active grid. Am I not able to find anything on it because it can not happen? I saw there are functions to do it, but no good examples or even real documentation on how to use them.

Most helpful comment

https://github.com/troolee/gridstack.js/tree/master/doc#enablemovedoenable-includenewwidgets
and
https://github.com/troolee/gridstack.js/tree/master/doc#enableresizedoenable-includenewwidgets

When you have your gridstack object in the grid variable, call .enableMove with false for doEnable and true for includeNewWidgets.
ie:

var grid = $('.grid-stack').data('gridstack');
grid.enableMove(false, true);
grid.enableResize(false, true);

As you'll note, the entirety of this information is already in the API docs. While we do not have large sets of examples for each individual API call, we have function signatures and explanations for every single public API call.

If you'd like to write some examples, the community would be delighted to include them in the documentation.

>All comments

https://github.com/troolee/gridstack.js/tree/master/doc#enablemovedoenable-includenewwidgets
and
https://github.com/troolee/gridstack.js/tree/master/doc#enableresizedoenable-includenewwidgets

When you have your gridstack object in the grid variable, call .enableMove with false for doEnable and true for includeNewWidgets.
ie:

var grid = $('.grid-stack').data('gridstack');
grid.enableMove(false, true);
grid.enableResize(false, true);

As you'll note, the entirety of this information is already in the API docs. While we do not have large sets of examples for each individual API call, we have function signatures and explanations for every single public API call.

If you'd like to write some examples, the community would be delighted to include them in the documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpotth picture jpotth  路  4Comments

ishields picture ishields  路  5Comments

athamsnajeeb1 picture athamsnajeeb1  路  7Comments

Metal101 picture Metal101  路  4Comments

GeniusWiki picture GeniusWiki  路  3Comments