@schneideress/dashboardframework 0.0.152 → 0.0.153

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.
@@ -660,6 +660,8 @@ class RADashboardResponsiveService {
660
660
  getGridsterItem(widget) {
661
661
  /** @type {?} */
662
662
  let gridsterItem = (/** @type {?} */ ({
663
+ actCols: widget.width,
664
+ actRows: widget.height,
663
665
  cols: this.getWidth(widget.width),
664
666
  rows: this.getHeight(widget.height),
665
667
  x: this.IsDesktopView ? widget.position_x : 0,
@@ -1089,18 +1091,29 @@ class RADashboardArea {
1089
1091
  */
1090
1092
  deleteWidget(widgetInstanceId, isalertDisabled = false) {
1091
1093
  /** @type {?} */
1092
- let widget = this.widgetList.filter((/**
1094
+ let gridsterItem = this.widgetList.filter((/**
1093
1095
  * @param {?} item
1094
1096
  * @return {?}
1095
1097
  */
1096
- function (item) {
1098
+ (item) => {
1097
1099
  return item.widgetInfo.widgetInstanceId === widgetInstanceId;
1098
1100
  }));
1099
- if (widget.length > 0) {
1100
- this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
1101
+ if (gridsterItem.length > 0) {
1102
+ /** @type {?} */
1103
+ let widget = this.userWidgets.filter((/**
1104
+ * @param {?} item
1105
+ * @return {?}
1106
+ */
1107
+ (item) => {
1108
+ return item.widgetInstanceId === widgetInstanceId;
1109
+ }));
1110
+ if (widget.length > 0) {
1111
+ this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
1112
+ }
1113
+ this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
1101
1114
  this.setAreaHeight();
1102
1115
  if (!isalertDisabled) {
1103
- this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + widget[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
1116
+ this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + gridsterItem[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
1104
1117
  }
1105
1118
  }
1106
1119
  }
@@ -1133,6 +1146,7 @@ class RADashboardArea {
1133
1146
  * @return {?}
1134
1147
  */
1135
1148
  widget => {
1149
+ this.userWidgets.push(widget);
1136
1150
  /** @type {?} */
1137
1151
  let gridsterItem = this.responsiveService.getGridsterItem(widget);
1138
1152
  this.widgetList.push(gridsterItem);
@@ -1198,6 +1212,7 @@ class RADashboardArea {
1198
1212
  widgets => {
1199
1213
  }));
1200
1214
  }
1215
+ this.userWidgets.push(data);
1201
1216
  /** @type {?} */
1202
1217
  let gridsterItem = this.responsiveService.getGridsterItem(data);
1203
1218
  this.widgetList.push(gridsterItem);