gridster/fix: calculating container_width correctly

Thanks @badtant for the notice (3d755fd793 (commitcomment-3423763))
This commit is contained in:
vieron
2013-06-14 12:03:06 +02:00
parent 10ef102e34
commit c0c12d0c38

View File

@@ -2549,8 +2549,10 @@
this.baseX = ($(window).width() - aw) / 2;
this.baseY = this.$wrapper.offset().top;
this.container_width = (this.cols * this.options.widget_base_dimensions[0]) +
(this.cols * this.options.widget_margins[0]) + this.options.widget_margins[0];
// left and right gutters not included
this.container_width = (this.cols *
this.options.widget_base_dimensions[0]) + ((this.cols - 1) * 2 *
this.options.widget_margins[0]);
if (this.options.autogenerate_stylesheet) {
this.generate_stylesheet();