Skip to content

Commit 9402f20

Browse files
committed
update coords for the new widget size.
Reported by @bmla in dbf98cc9bdc#commitcomment-1735360
1 parent 1086fe5 commit 9402f20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/jquery.gridster.js

+8
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@
273273
wgd.size_y = size_y;
274274
this.add_to_gridmap(new_grid_data, $widget);
275275

276+
//update coords instance attributes
277+
$widget.data('coords').update({
278+
width: (size_x * this.options.widget_base_dimensions[0] +
279+
((size_x - 1) * this.options.widget_margins[0]) * 2),
280+
height: (size_y * this.options.widget_base_dimensions[1] +
281+
((size_y - 1) * this.options.widget_margins[1]) * 2)
282+
});
283+
276284
if (size_y > old_size_y) {
277285
this.add_faux_rows(size_y - old_size_y);
278286
};

0 commit comments

Comments
 (0)