Is it possible to make only one gridster widget resizable?
I've made it so the user can click on a widget heading so that it expands & contracts.
I'd like to make it so that when a widget is expanded, it is resizable.
Can this be done? If so, how?
When resize is enable each widget get the gs-resize-handle class in a span element with the setup_resize() function.
so you can play with css to hide the resize handle with css by adding a custom class like :
and when you expand your widget your remove your custom class.
EDIT :
An another way to do this could be like in the demo on gridster expandable demo with a some change on the click event.
You can have only some "specific" widgets resizable modifying (only 4 lines of) the library as follows ( refer to gridster.js - v0.5.1 - 2014-03-26) ..
1) Update the add_widget function (modified lines are marked as "custom" in the comments):
[...]
2) update the register_widget function (again, mind the word "custom" in the comments):
Done!
The new signature of the add_widget function is now:
Just set "resizable" parameter to true if you want a widget to be resizable!