@schneideress/dashboardframework 0.0.40 → 0.0.41

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.
@@ -875,8 +875,8 @@
875
875
  this.widgetList = Array();
876
876
  this.gridheight = 300;
877
877
  this.isWidgetLoaded = false;
878
- this.widgetHeight = 50;
879
- this.widgetWidth = 60;
878
+ this.widgetHeight = 30;
879
+ this.widgetWidth = 50;
880
880
  }
881
881
  /**
882
882
  * @return {?}
@@ -1091,6 +1091,7 @@
1091
1091
  dashboardId: userDashboarId.toString(),
1092
1092
  dashboardAreaKey: areaKey
1093
1093
  }));
1094
+ areaContext.widgetList = [];
1094
1095
  this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
1095
1096
  * @param {?} widgets
1096
1097
  * @return {?}
@@ -1201,11 +1202,12 @@
1201
1202
  data.position_y = 0;
1202
1203
  /** @type {?} */
1203
1204
  var gridsterItem = this.mapObjectsToGridsterItem(data);
1204
- if (this.options.api) {
1205
- gridsterItem = this.options.api.getFirstPossiblePosition(gridsterItem);
1206
- }
1207
- data.position_x = gridsterItem.x;
1208
- data.position_y = gridsterItem.y;
1205
+ /** to find the available position in gridster, temp commenting the code-returning higher y value than normal */
1206
+ // if (this.options.api) {
1207
+ // gridsterItem = this.options.api.getFirstPossiblePosition(gridsterItem);
1208
+ // }
1209
+ // data.position_x = gridsterItem.x;
1210
+ // data.position_y = gridsterItem.y;
1209
1211
  data.dashboardAreaKey = this.areaKey;
1210
1212
  data.dashboardId = this.userDashboardId;
1211
1213
  this.ngxService.start();
@@ -1217,7 +1219,13 @@
1217
1219
  gridsterItem = _this.mapObjectsToGridsterItem(widget);
1218
1220
  _this.widgetList.push(gridsterItem);
1219
1221
  _this.setAreaHeight();
1220
- //this.ngxService.stop();
1222
+ /**To save added widget position in db */
1223
+ setTimeout((/**
1224
+ * @return {?}
1225
+ */
1226
+ function () {
1227
+ _this.updateWidgets();
1228
+ }), 1000);
1221
1229
  }));
1222
1230
  };
1223
1231
  /** To add widget to current widget list ,invoked from copy widget window*/
@@ -1625,7 +1633,7 @@
1625
1633
  return __generator(this, function (_a) {
1626
1634
  switch (_a.label) {
1627
1635
  case 0:
1628
- console.log('widget initiate' + widgetInfo.widgetInstanceId);
1636
+ console.log('widget initiated' + widgetInfo.widgetInstanceId);
1629
1637
  widgetContainer.isWidgetLoaded = true;
1630
1638
  widgetConfigFilter.appConfig = this.appConfig;
1631
1639
  widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));