diff --git a/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts b/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts index cc93307434..3cce859ef4 100644 --- a/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts +++ b/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts @@ -81,6 +81,7 @@ export class GridDragAndDropService implements OnDestroy { public abort() { document.dispatchEvent(new Event('mouseup')); this.aborted = true; + this.layout.resetAreas(); } public stop() { @@ -92,15 +93,14 @@ export class GridDragAndDropService implements OnDestroy { this.placeholderArea = null; } - public drop(event:CdkDragDrop) { + public drop(draggedArea:GridWidgetArea, event:CdkDragDrop) { if (this.aborted) { this.aborted = false; return; } // this.draggedArea is already reset to null at this point - let dropArea = event.container.data; - let draggedArea = event.previousContainer.data as GridWidgetArea; + let dropArea = this.layout.mousedOverArea!; // Set the draggedArea's startRow/startColumn properties // to the drop zone ones. diff --git a/frontend/src/app/modules/grids/grid/grid.component.html b/frontend/src/app/modules/grids/grid/grid.component.html index 07a2469acc..6338d449e7 100644 --- a/frontend/src/app/modules/grids/grid/grid.component.html +++ b/frontend/src/app/modules/grids/grid/grid.component.html @@ -19,6 +19,7 @@