Move the check for responsive width above the calculations of width. This will prevent the calculated values changing the width for browsers which don't respect min-width

This commit is contained in:
David Morse
2015-04-04 22:38:23 -06:00
parent aa8f4bf3d0
commit 3ec0c6fa6e
5 changed files with 17 additions and 20 deletions
+5 -6
View File
@@ -3866,15 +3866,14 @@
cols = this.get_highest_occupied_cell().col;
}
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this;
}
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
cols = Math.min(max_cols, Math.max(cols, this.options.min_cols));
this.container_width = ((cols + 1) * this.options.widget_margins[0]) + (cols * this.min_widget_width);
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this; //if we are responsive exit before setting the width of $el
}
this.$el.css('width', this.container_width);
return this;
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -6
View File
@@ -3866,15 +3866,14 @@
cols = this.get_highest_occupied_cell().col;
}
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this;
}
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
cols = Math.min(max_cols, Math.max(cols, this.options.min_cols));
this.container_width = ((cols + 1) * this.options.widget_margins[0]) + (cols * this.min_widget_width);
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this; //if we are responsive exit before setting the width of $el
}
this.$el.css('width', this.container_width);
return this;
File diff suppressed because one or more lines are too long
+5 -6
View File
@@ -3019,15 +3019,14 @@
cols = this.get_highest_occupied_cell().col;
}
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this;
}
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
var max_cols = (this.options.autogrow_cols ? this.options.max_cols : this.cols);
cols = Math.min(max_cols, Math.max(cols, this.options.min_cols));
this.container_width = ((cols + 1) * this.options.widget_margins[0]) + (cols * this.min_widget_width);
if(this.is_responsive()) {
this.$el.css({'min-width': '100%', 'max-width': '100%'});
return this; //if we are responsive exit before setting the width of $el
}
this.$el.css('width', this.container_width);
return this;