mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 08:03:51 +02:00
Merge commit 'e69c3e8f64aa4557ef032e4d0d8185e83b1aed21'
fix(gridster): responsive width now resizes based off wrapper not window
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user