Skip to content

Commit 2da65b9

Browse files
authored
Merge pull request swiety85#81 from swiety85/update-gridster-element-on-drag-start
Update gridster element item on drag start
2 parents 75dcb24 + f4d87d0 commit 2da65b9

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

demo/src/app/gridster/gridster.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class GridsterComponent implements OnInit, AfterViewInit, OnDestroy {
179179
return this;
180180
}
181181

182-
private updateGridsterElementData() {
182+
updateGridsterElementData() {
183183
this.gridster.gridsterRect = this.$element.getBoundingClientRect();
184184
}
185185

demo/src/app/gridster/gridster.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export class GridsterService {
193193
this.highlightPositionForItem(item);
194194

195195
this.gridsterComponent.isDragging = true;
196+
this.gridsterComponent.updateGridsterElementData();
196197
}
197198

198199
onDrag (item: GridListItem) {

src/gridster.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class GridsterComponent implements OnInit, AfterViewInit, OnDestroy {
179179
return this;
180180
}
181181

182-
private updateGridsterElementData() {
182+
updateGridsterElementData() {
183183
this.gridster.gridsterRect = this.$element.getBoundingClientRect();
184184
}
185185

src/gridster.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export class GridsterService {
193193
this.highlightPositionForItem(item);
194194

195195
this.gridsterComponent.isDragging = true;
196+
this.gridsterComponent.updateGridsterElementData();
196197
}
197198

198199
onDrag (item: GridListItem) {

0 commit comments

Comments
 (0)