Skip to content

Commit

Permalink
fix(droppable): correctly account for scroll events when dragging ele…
Browse files Browse the repository at this point in the history
…ments

Fixes #23
  • Loading branch information
mattlewis92 committed Jun 17, 2018
1 parent e95b5a0 commit c5ef775
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/droppable.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,14 @@ export class DroppableDirective implements OnInit, OnDestroy {
ngOnInit(): void {
this.currentDragSubscription = this.draggableHelper.currentDrag.subscribe(
drag$ => {
const droppableRectangle = this.element.nativeElement.getBoundingClientRect();

let currentDragDropData: any;
const overlaps$ = drag$.pipe(
map(({ clientX, clientY, dropData }) => {
currentDragDropData = dropData;
return isCoordinateWithinRectangle(
clientX,
clientY,
droppableRectangle
this.element.nativeElement.getBoundingClientRect()
);
})
);
Expand Down

0 comments on commit c5ef775

Please sign in to comment.