Skip to content

Commit

Permalink
fix: prevent the default move move interaction on dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Nov 27, 2016
1 parent 38fd4b5 commit d2fdcde
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/draggable.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ export class Draggable implements OnInit, OnDestroy {

const mouseMove: Observable<Coordinates> = this.mouseMove
.map((mouseMoveEvent: MouseEvent) => {

mouseMoveEvent.preventDefault();

return {
currentDrag,
x: mouseMoveEvent.clientX - mouseDownEvent.clientX,
y: mouseMoveEvent.clientY - mouseDownEvent.clientY
};

})
.map((moveData: Coordinates) => {
if (!this.dragAxis.x) {
Expand Down

0 comments on commit d2fdcde

Please sign in to comment.