Skip to content

Commit

Permalink
fix: disable drag events when resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Feb 3, 2017
1 parent 8ca99cd commit 43c128c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/day/calendarDayViewEvent.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class CalendarDayViewEventComponent {

dragStart(event: HTMLElement): void {
const dragHelper: CalendarDragHelper = new CalendarDragHelper(this.dayViewContainer, event);
this.validateDrag = ({x, y}) => dragHelper.validateDrag({x, y});
this.validateDrag = ({x, y}) => !this.currentResize && dragHelper.validateDrag({x, y});
this.cdr.markForCheck();
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/week/calendarWeekView.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
*/
dragStart(weekViewContainer: HTMLElement, event: HTMLElement): void {
const dragHelper: CalendarDragHelper = new CalendarDragHelper(weekViewContainer, event);
this.validateDrag = ({x, y}) => dragHelper.validateDrag({x, y});
this.validateDrag = ({x, y}) => !this.currentResize && dragHelper.validateDrag({x, y});
this.cdr.markForCheck();
}

Expand Down

0 comments on commit 43c128c

Please sign in to comment.