Skip to content

Commit e69c3e8

Browse files
committed
fix(gridster): responsive width now resizes based off wrapper not window
1 parent 65f43a5 commit e69c3e8

7 files changed

+14
-14
lines changed

dist/jquery.gridster.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.6 - 2015-04-14
1+
/*! gridster.js - v0.6.6 - 2015-04-22
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

dist/jquery.gridster.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.6 - 2015-04-14
1+
/*! gridster.js - v0.6.6 - 2015-04-22
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

@@ -4026,12 +4026,12 @@
40264026

40274027
for (var y = 1; y <= opts.rows; y++) {
40284028
styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
4029-
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + 'px; }\n');
4029+
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + (full_width ? '': 'px') +'; }\n');
40304030
}
40314031

40324032
for (var x = 1; x <= max_size_x; x++) {
40334033
styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
4034-
(full_width ? ($(window).width() - this.options.widget_margins[0] * 2) : ((x * opts.widget_base_dimensions[0]) + ((x - 1) * opts.widget_margins[0]))) + 'px; }\n');
4034+
(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');
40354035
}
40364036

40374037
this.remove_style_tags();

dist/jquery.gridster.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.gridster.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.gridster.with-extras.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.6 - 2015-04-14
1+
/*! gridster.js - v0.6.6 - 2015-04-22
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

@@ -4026,12 +4026,12 @@
40264026

40274027
for (var y = 1; y <= opts.rows; y++) {
40284028
styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
4029-
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + 'px; }\n');
4029+
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + (full_width ? '': 'px') +'; }\n');
40304030
}
40314031

40324032
for (var x = 1; x <= max_size_x; x++) {
40334033
styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
4034-
(full_width ? ($(window).width() - this.options.widget_margins[0] * 2) : ((x * opts.widget_base_dimensions[0]) + ((x - 1) * opts.widget_margins[0]))) + 'px; }\n');
4034+
(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');
40354035
}
40364036

40374037
this.remove_style_tags();

dist/jquery.gridster.with-extras.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.gridster.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3179,12 +3179,12 @@
31793179

31803180
for (var y = 1; y <= opts.rows; y++) {
31813181
styles += (opts.namespace + ' [data-sizey="' + y + '"] { height:' +
3182-
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + 'px; }\n');
3182+
(full_width ? 'auto' : ((y * opts.widget_base_dimensions[1]) + ((y - 1) * opts.widget_margins[1]))) + (full_width ? '': 'px') +'; }\n');
31833183
}
31843184

31853185
for (var x = 1; x <= max_size_x; x++) {
31863186
styles += (opts.namespace + ' [data-sizex="' + x + '"] { width:' +
3187-
(full_width ? ($(window).width() - this.options.widget_margins[0] * 2) : ((x * opts.widget_base_dimensions[0]) + ((x - 1) * opts.widget_margins[0]))) + 'px; }\n');
3187+
(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');
31883188
}
31893189

31903190
this.remove_style_tags();

0 commit comments

Comments
 (0)