Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

throttle first to allow reactivating an area passed very fast

ulferts46a59ba04955
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 186d905025e..db2ccbd3acb 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
@@ -28,9 +28,10 @@ export class GridDragAndDropService implements OnDestroy {
.layout
.$mousedOverArea
.pipe(
+ // avoid flickering of widgets as the grid gets resized by the placeholder movement
+ throttleTime(10),
distinctUntilChanged(),
filter((area) => this.currentlyDragging && !!area && !this.layout.isGap(area) && (this.placeholderArea!.startRow !== area.startRow || this.placeholderArea!.startColumn !== area.startColumn)),
- throttleTime(10)
).subscribe(area => {
this.updateArea(area!);
diff --git a/frontend/src/app/modules/grids/grid/grid.component.html b/frontend/src/app/modules/grids/grid/grid.component.html
index 4d429f78737..28960764f4f 100644
--- a/frontend/src/app/modules/grids/grid/grid.component.html
+++ b/frontend/src/app/modules/grids/grid/grid.component.html
@@ -82,7 +82,7 @@
(mouseover)="layout.setMousedOverArea(gap)">
<div class="grid--widget-add -gap hidden-for-mobile"
[title]="add.addText"
- (click)="add.widget(gap, layout.schema)">
+ (click)="add.widget(gap)">
</div>
</div>