Skip to content

Commit c5bb259

Browse files
author
Alain Dumesny
authored
Merge pull request #1051 from adumesny/bugfix/924
widget properties when dropping it into other grid
2 parents 39eb0de + 1e747cc commit c5bb259

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

demo/two.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,16 @@ <h1>Two grids demo</h1>
105105
{x: 0, y: 0, width: 2, height: 2},
106106
{x: 3, y: 1, width: 1, height: 2},
107107
{x: 4, y: 1, width: 1, height: 1},
108-
{x: 2, y: 3, width: 3, height: 1},
108+
{x: 2, y: 3, width: 3, height: 1, minWidth: 2, id: 'special', text: 'has minWidth=2'},
109109
{x: 2, y: 5, width: 1, height: 1}
110110
];
111111

112112
$('.grid-stack').each(function () {
113113
var grid = $(this).data('gridstack');
114114

115115
items.forEach(function (node) {
116-
grid.addWidget($('<div><div class="grid-stack-item-content"></div></div>'), node);
116+
grid.addWidget($('<div><div class="grid-stack-item-content">'
117+
+ (node.text? node.text : '') + '</div></div>'), node);
117118
});
118119
});
119120

0 commit comments

Comments
 (0)