@syncfusion/ej2-layouts 29.1.38 → 29.1.39

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.
@@ -3099,6 +3099,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3099
3099
  this.setHeightAndWidth(el, panelModel);
3100
3100
  }
3101
3101
  removeClass([el], [dragging]);
3102
+ args.panels = this.getChangingPanels();
3102
3103
  this.trigger('resizeStop', args);
3103
3104
  this.resizeCalled = false;
3104
3105
  this.lastMouseX = this.lastMouseY = undefined;
@@ -3111,6 +3112,12 @@ let DashboardLayout = class DashboardLayout extends Component {
3111
3112
  this.updateCloneArrayObject();
3112
3113
  this.checkForChanges(true);
3113
3114
  }
3115
+ getChangingPanels() {
3116
+ if (!this.resizeCalled) {
3117
+ this.updatePanels();
3118
+ }
3119
+ return this.getChangedPanels();
3120
+ }
3114
3121
  getResizeRowColumn(item) {
3115
3122
  let isChanged = false;
3116
3123
  let col = item.col;
@@ -4364,6 +4371,16 @@ let DashboardLayout = class DashboardLayout extends Component {
4364
4371
  return value;
4365
4372
  }
4366
4373
  checkForChanges(isInteracted, added, removed) {
4374
+ const changedPanels = this.getChangedPanels(removed);
4375
+ if (changedPanels.length > 0 || this.removeAllCalled) {
4376
+ const changedArgs = {
4377
+ changedPanels: changedPanels, isInteracted: isInteracted,
4378
+ addedPanels: !isNullOrUndefined(added) ? added : [], removedPanels: !isNullOrUndefined(removed) ? removed : []
4379
+ };
4380
+ this.trigger('change', changedArgs);
4381
+ }
4382
+ }
4383
+ getChangedPanels(removed) {
4367
4384
  let changedPanels = [];
4368
4385
  if (this.removeAllCalled) {
4369
4386
  changedPanels = [];
@@ -4377,13 +4394,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4377
4394
  }
4378
4395
  }
4379
4396
  }
4380
- if (changedPanels.length > 0 || this.removeAllCalled) {
4381
- const changedArgs = {
4382
- changedPanels: changedPanels, isInteracted: isInteracted,
4383
- addedPanels: !isNullOrUndefined(added) ? added : [], removedPanels: !isNullOrUndefined(removed) ? removed : []
4384
- };
4385
- this.trigger('change', changedArgs);
4386
- }
4397
+ return changedPanels;
4387
4398
  }
4388
4399
  enableDraggingContent(collections) {
4389
4400
  for (let i = 0; i < collections.length; i++) {
@@ -4399,7 +4410,9 @@ let DashboardLayout = class DashboardLayout extends Component {
4399
4410
  abort: abortArray,
4400
4411
  dragStart: this.onDraggingStart.bind(this),
4401
4412
  dragStop: (args) => {
4402
- this.trigger('dragStop', args);
4413
+ const dragStopArgs = args;
4414
+ dragStopArgs.panels = this.getChangingPanels();
4415
+ this.trigger('dragStop', dragStopArgs);
4403
4416
  if (isNullOrUndefined(args.cancel)) {
4404
4417
  args.cancel = false;
4405
4418
  }
@@ -5042,6 +5055,7 @@ let DashboardLayout = class DashboardLayout extends Component {
5042
5055
  this.updatePanelLayout(ele, panelInstance);
5043
5056
  this.updatePanels();
5044
5057
  this.updateRowHeight();
5058
+ args.panels = this.getChangingPanels();
5045
5059
  this.resizeCalled = false;
5046
5060
  this.trigger('resizeStop', args);
5047
5061
  this.checkForChanges(false);