Skip to content

Commit 595a94f

Browse files
committed
fix(gridster): ensure widget dimensions and coords are always ints
Thanks to @sogawa for reporting
1 parent 3140374 commit 595a94f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jquery.gridster.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@
858858
) {
859859
$.extend(wgd, this.next_position(wgd.size_x, wgd.size_y));
860860
$el.attr({
861-
'data-col': wgd.col,
862-
'data-row': wgd.row,
863-
'data-sizex': wgd.size_x,
864-
'data-sizey': wgd.size_y
861+
'data-col': parseInt(wgd.col, 10),
862+
'data-row': parseInt(wgd.row, 10),
863+
'data-sizex': parseInt(wgd.size_x, 10),
864+
'data-sizey': parseInt(wgd.size_y, 10)
865865
});
866866
posChanged = true;
867867
}

0 commit comments

Comments
 (0)