Skip to content

Commit d2d1ec7

Browse files
committed
fix for autopositioning of widgets when upgrading
1 parent e65c707 commit d2d1ec7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

plugins/dashboards/frontend/public/javascripts/countly.views.js

+9
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,15 @@
13071307
if (this.grid) {
13081308
this.grid.destroy();
13091309
}
1310+
},
1311+
autoPosition: function(allWidgets) {
1312+
var autoposition = false;
1313+
allWidgets.forEach(function(widget) {
1314+
if (!widget.position) {
1315+
autoposition = true;
1316+
}
1317+
});
1318+
return autoposition;
13101319
}
13111320
},
13121321
mounted: function() {

plugins/dashboards/frontend/public/templates/grid.html

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:key="widget._id"
77
:widget="widget"
88
:settings="widgetSettingsGetter(widget, true)"
9+
:autoPosition="autoPosition(allWidgets)"
910
:loading="loading"
1011
@ready="onReady"
1112
@command="onWidgetAction">

0 commit comments

Comments
 (0)