Skip to content

Commit 0a95ac7

Browse files
committed
fix(dragCursor): don't default the drag cursor to move
BREAKING CHANGE: The drag cursor will no longer be set to `move` by default, to restore the behaviour set `dragCursor="move"` or use CSS on the draggable elements to change the cursor
1 parent d010733 commit 0a95ac7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

demo/demo.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { Component } from '@angular/core';
2727
z-index: 2;
2828
float: left;
2929
margin-right: 10px;
30+
cursor: move;
3031
}
3132
[mwlDroppable] {
3233
background-color: green;

src/draggable.directive.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export interface PointerEvent {
5858
event: MouseEvent | TouchEvent;
5959
}
6060

61-
const MOVE_CURSOR: string = 'move';
62-
6361
@Directive({
6462
selector: '[mwlDraggable]'
6563
})
@@ -97,7 +95,7 @@ export class DraggableDirective implements OnInit, OnChanges, OnDestroy {
9795
/**
9896
* The cursor to use when dragging the element
9997
*/
100-
@Input() dragCursor = MOVE_CURSOR;
98+
@Input() dragCursor: string = '';
10199

102100
/**
103101
* The css class to apply when the element is being dragged

0 commit comments

Comments
 (0)