You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using gridstack with acceptWidgets to drag-and-drop widgets from a left side panel to the main panel, kind of similar to http://gridstackjs.com/demo/two.html
In my case, I want to set height, width and other item attributes to my "grid-stack-item" so then when they're dropped they'd have some pre-defined height and width. However, setting up those attributes won't affect when the item is dropped in the gridstack.
I'm using gridstack with
acceptWidgets
to drag-and-drop widgets from a left side panel to the main panel, kind of similar to http://gridstackjs.com/demo/two.htmlIn my case, I want to set height, width and other item attributes to my "grid-stack-item" so then when they're dropped they'd have some pre-defined height and width. However, setting up those attributes won't affect when the item is dropped in the gridstack.
Here is a JSFiddle: https://jsfiddle.net/trevisan/wt7bg6s1/8/
Note that the "Drag me" element has data-gs-width="6" which I expected to make it stretch as my gridstack has 6 columns.
I have tried to call
makeWidget
method but then I end up having two widgets on my gridstack.Does anyone have an idea how to figure that out?
The text was updated successfully, but these errors were encountered: