Subject of the issue
The data attributes are ignored during adding new widgets through the addWidget function with specified coordinates.
Your environment
- gridstack version: 1.1.1
- browsers: any
Steps to reproduce
https://jsfiddle.net/Alexander_Sokolov/tu03kbgv/24/
- initialize the Grid with
column=4
- prepare the widget HTML with an attribute
data-gs-width="3"
- use the
addWidget function to add new widget to the grid container with x and y coordinates:
grid.addWidget(htmlElement, 0, 0);
Expected behaviour
The widget width is initialized from the HTML attribute (like it was in v0.4)
Actual behaviour
The data-gs-width attribute is ignored
Subject of the issue
The data attributes are ignored during adding new widgets through the
addWidgetfunction with specified coordinates.Your environment
Steps to reproduce
https://jsfiddle.net/Alexander_Sokolov/tu03kbgv/24/
column=4data-gs-width="3"addWidgetfunction to add new widget to the grid container withxandycoordinates:grid.addWidget(htmlElement, 0, 0);Expected behaviour
The widget
widthis initialized from the HTML attribute (like it was in v0.4)Actual behaviour
The
data-gs-widthattribute is ignored