From 6c08842989139430516e142cca74165fc0d36d1b Mon Sep 17 00:00:00 2001 From: Sergey Akopkokhyants Date: Fri, 7 Apr 2017 22:51:00 +0200 Subject: [PATCH] fix(): Fixed a bug mouse cursor accurately reverts back after single list reorder operation. --- README.md | 1 + src/abstract.component.ts | 3 +++ src/dnd.config.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index cfe7f63..49a70d6 100644 --- a/README.md +++ b/README.md @@ -682,6 +682,7 @@ class Widget { # Credits - [Francesco Cina](https://github.com/ufoscout) - [Valerii Kuznetsov](https://github.com/solival) +- [Shane Oborn](https://github.com/obosha) # License [MIT](/LICENSE) diff --git a/src/abstract.component.ts b/src/abstract.component.ts index 10eb1fa..d37b17b 100644 --- a/src/abstract.component.ts +++ b/src/abstract.component.ts @@ -94,7 +94,10 @@ export abstract class AbstractComponent { constructor(elemRef: ElementRef, public _dragDropService: DragDropService, public _config: DragDropConfig, private _cdr: ChangeDetectorRef) { + // Assign default cursor unless overridden + this._defaultCursor = _config.defaultCursor; this._elem = elemRef.nativeElement; + this._elem.style.cursor = this._defaultCursor; // set default cursor on our element // // DROP events // diff --git a/src/dnd.config.ts b/src/dnd.config.ts index c269f43..a8609f7 100644 --- a/src/dnd.config.ts +++ b/src/dnd.config.ts @@ -38,4 +38,5 @@ export class DragDropConfig { public dropEffect: DataTransferEffect = DataTransferEffect.MOVE; public dragCursor: string = "move"; public dragImage: DragImage; + public defaultCursor: string = "pointer"; } \ No newline at end of file