c2s-ngx-dnd
Advanced tools
Comparing version 1.2.8 to 1.2.9
@@ -18,2 +18,3 @@ import { OnDestroy, OnInit, ElementRef, EventEmitter } from '@angular/core'; | ||
dndSelected: EventEmitter<any>; | ||
dndComparer: (object, item) => boolean; | ||
private dragState; | ||
@@ -20,0 +21,0 @@ private dropSubscription; |
@@ -5,2 +5,5 @@ import { Directive, Input, Output, ElementRef, HostListener, EventEmitter } from '@angular/core'; | ||
import { dropAccepted } from './dnd-list'; | ||
const __jsonComparer = (o, i) => JSON.stringify(o) === JSON.stringify(i); | ||
var DndDraggable = (function () { | ||
@@ -40,3 +43,8 @@ function DndDraggable(element, dndState) { | ||
var item = _a.item, list = _a.list; | ||
if (JSON.stringify(_this.dndObject) === JSON.stringify(item)) { | ||
if(this.dndComparer === undefined) { | ||
this.dndComparer = __jsonComparer; | ||
} | ||
if ( this.dndComparer(_this.dndObject, item)) { | ||
var cb = { copy: 'dndCopied', link: 'dndLinked', move: 'dndMoved', none: 'dndCanceled' }; | ||
@@ -43,0 +51,0 @@ if (_this.dragState) { |
@@ -1,1 +0,97 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"DndHandle":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[dndHandle]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":22,"character":25},{"__symbolic":"reference","module":"../services","name":"DndState","line":23,"character":26}]}],"handleDragStart":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":31,"character":5},"arguments":["dragstart",["$event"]]}]}],"handleDragEnd":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":37,"character":5},"arguments":["dragend",["$event"]]}]}]}}}}] | ||
[ | ||
{ | ||
"__symbolic": "module", | ||
"version": 4, | ||
"metadata": { | ||
"DndHandle": { | ||
"__symbolic": "class", | ||
"decorators": [ | ||
{ | ||
"__symbolic": "call", | ||
"expression": { | ||
"__symbolic": "reference", | ||
"module": "@angular/core", | ||
"name": "Directive", | ||
"line": 6, | ||
"character": 1 | ||
}, | ||
"arguments": [ | ||
{ | ||
"selector": "[dndHandle]" | ||
} | ||
] | ||
} | ||
], | ||
"members": { | ||
"__ctor__": [ | ||
{ | ||
"__symbolic": "constructor", | ||
"parameters": [ | ||
{ | ||
"__symbolic": "reference", | ||
"module": "@angular/core", | ||
"name": "ElementRef", | ||
"line": 22, | ||
"character": 25 | ||
}, | ||
{ | ||
"__symbolic": "reference", | ||
"module": "../services", | ||
"name": "DndState", | ||
"line": 23, | ||
"character": 26 | ||
} | ||
] | ||
} | ||
], | ||
"handleDragStart": [ | ||
{ | ||
"__symbolic": "method", | ||
"decorators": [ | ||
{ | ||
"__symbolic": "call", | ||
"expression": { | ||
"__symbolic": "reference", | ||
"module": "@angular/core", | ||
"name": "HostListener", | ||
"line": 31, | ||
"character": 5 | ||
}, | ||
"arguments": [ | ||
"dragstart", | ||
[ | ||
"$event" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"handleDragEnd": [ | ||
{ | ||
"__symbolic": "method", | ||
"decorators": [ | ||
{ | ||
"__symbolic": "call", | ||
"expression": { | ||
"__symbolic": "reference", | ||
"module": "@angular/core", | ||
"name": "HostListener", | ||
"line": 37, | ||
"character": 5 | ||
}, | ||
"arguments": [ | ||
"dragend", | ||
[ | ||
"$event" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] |
@@ -53,3 +53,3 @@ { | ||
}, | ||
"version": "1.2.8" | ||
"version": "1.2.9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77459
1110