@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.
@@ -794,6 +794,8 @@ var RADashboardResponsiveService = /** @class */ (function () {
794
794
  function (widget) {
795
795
  /** @type {?} */
796
796
  var gridsterItem = (/** @type {?} */ ({
797
+ actCols: widget.width,
798
+ actRows: widget.height,
797
799
  cols: this.getWidth(widget.width),
798
800
  rows: this.getHeight(widget.height),
799
801
  x: this.IsDesktopView ? widget.position_x : 0,
@@ -1305,18 +1307,29 @@ var RADashboardArea = /** @class */ (function () {
1305
1307
  function (widgetInstanceId, isalertDisabled) {
1306
1308
  if (isalertDisabled === void 0) { isalertDisabled = false; }
1307
1309
  /** @type {?} */
1308
- var widget = this.widgetList.filter((/**
1310
+ var gridsterItem = this.widgetList.filter((/**
1309
1311
  * @param {?} item
1310
1312
  * @return {?}
1311
1313
  */
1312
1314
  function (item) {
1313
1315
  return item.widgetInfo.widgetInstanceId === widgetInstanceId;
1314
1316
  }));
1315
- if (widget.length > 0) {
1316
- this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
1317
+ if (gridsterItem.length > 0) {
1318
+ /** @type {?} */
1319
+ var widget = this.userWidgets.filter((/**
1320
+ * @param {?} item
1321
+ * @return {?}
1322
+ */
1323
+ function (item) {
1324
+ return item.widgetInstanceId === widgetInstanceId;
1325
+ }));
1326
+ if (widget.length > 0) {
1327
+ this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
1328
+ }
1329
+ this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
1317
1330
  this.setAreaHeight();
1318
1331
  if (!isalertDisabled) {
1319
- this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + widget[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
1332
+ this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + gridsterItem[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
1320
1333
  }
1321
1334
  }
1322
1335
  };
@@ -1364,6 +1377,7 @@ var RADashboardArea = /** @class */ (function () {
1364
1377
  * @return {?}
1365
1378
  */
1366
1379
  function (widget) {
1380
+ _this.userWidgets.push(widget);
1367
1381
  /** @type {?} */
1368
1382
  var gridsterItem = _this.responsiveService.getGridsterItem(widget);
1369
1383
  _this.widgetList.push(gridsterItem);
@@ -1440,6 +1454,7 @@ var RADashboardArea = /** @class */ (function () {
1440
1454
  function (widgets) {
1441
1455
  }));
1442
1456
  }
1457
+ this.userWidgets.push(data);
1443
1458
  /** @type {?} */
1444
1459
  var gridsterItem = this.responsiveService.getGridsterItem(data);
1445
1460
  this.widgetList.push(gridsterItem);