mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
Fix grid calculations when wrapper/gridster element is not centered
This commit is contained in:
@@ -3956,6 +3956,10 @@
|
|||||||
this.baseX = ($window.width() - aw) / 2;
|
this.baseX = ($window.width() - aw) / 2;
|
||||||
this.baseY = this.$wrapper.offset().top;
|
this.baseY = this.$wrapper.offset().top;
|
||||||
|
|
||||||
|
if (this.$wrapper.css('position') == 'relative') {
|
||||||
|
this.baseX = this.baseY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$.each(this.faux_grid, $.proxy(function (i, coords) {
|
$.each(this.faux_grid, $.proxy(function (i, coords) {
|
||||||
this.faux_grid[i] = coords.update({
|
this.faux_grid[i] = coords.update({
|
||||||
left: this.baseX + (coords.data.col - 1) * this.min_widget_width,
|
left: this.baseX + (coords.data.col - 1) * this.min_widget_width,
|
||||||
|
|||||||
Reference in New Issue
Block a user