Merge commit 'e69c3e8f64aa4557ef032e4d0d8185e83b1aed21'

fix(gridster): responsive width now resizes based off wrapper not window
This commit is contained in:
David Morse
2015-04-28 21:18:55 -06:00
+4 -3
View File
@@ -3723,13 +3723,14 @@
for (var y = 1; y <= opts.rows; y++) {
styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + 'px; }\n');
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + (full_width ? '' : 'px') + '; }\n');
}
for (var x = 1; x <= opts.cols; x++) {
styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
(full_width ? ($(window).width() - this.options.widget_margins[0] * 2) :
((x * opts.widget_base_dimensions[0]) + ((x - 1) * opts.widget_margins[0]))) + 'px; }\n');
(full_width ? (this.$wrapper.width() - this.options.widget_margins[0] * 2) : ((x * opts.widget_base_dimensions[0]) + ((x - 1) * opts.widget_margins[0]))) + 'px; }\n');
}
this.remove_style_tags();