@schneideress/dashboardframework 0.0.153 → 0.0.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -794,8 +794,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
794
794
  function (widget) {
795
795
  /** @type {?} */
796
796
  var gridsterItem = (/** @type {?} */ ({
797
- actCols: widget.width,
798
- actRows: widget.height,
799
797
  cols: this.getWidth(widget.width),
800
798
  rows: this.getHeight(widget.height),
801
799
  x: this.IsDesktopView ? widget.position_x : 0,
@@ -1213,22 +1211,6 @@ var RADashboardArea = /** @class */ (function () {
1213
1211
  * @return {?}
1214
1212
  */
1215
1213
  function (widgets) {
1216
- //sorting the widgets y, x
1217
- widgets = widgets.sort((/**
1218
- * @param {?} a
1219
- * @param {?} b
1220
- * @return {?}
1221
- */
1222
- function (a, b) {
1223
- if (a['position_y'] > b['position_y'])
1224
- return 1;
1225
- if (a['position_y'] < b['position_y'])
1226
- return -1;
1227
- if (a['position_x'] > b['position_x'])
1228
- return 1;
1229
- if (a['position_x'] < b['position_x'])
1230
- return -1;
1231
- }));
1232
1214
  _this.userWidgets = widgets;
1233
1215
  if (widgets && widgets.length > 0) {
1234
1216
  _this.widgetList = _this.mapObjectListToGridsterItemList(widgets);
@@ -1395,12 +1377,14 @@ var RADashboardArea = /** @class */ (function () {
1395
1377
  if (widget && widget.widgetInstanceId) {
1396
1378
  widgetInstanceId = widget.widgetInstanceId;
1397
1379
  /**To save added widget position in db */
1398
- setTimeout((/**
1399
- * @return {?}
1400
- */
1401
- function () {
1402
- _this.updateWidgetPosition(widgetInstanceId);
1403
- }), 1000);
1380
+ if (_this.responsiveService.IsDesktopView) {
1381
+ setTimeout((/**
1382
+ * @return {?}
1383
+ */
1384
+ function () {
1385
+ _this.updateWidgetPosition(widgetInstanceId);
1386
+ }));
1387
+ }
1404
1388
  }
1405
1389
  _this.raDashboardEventBus.publish(RAEvent.WidgetAdded, widget);
1406
1390
  }));