Prevent dragging a datalayer to activate drag on the map
This commit is contained in:
parent
0a900bdd3b
commit
0c99bc45a8
1 changed files with 2 additions and 0 deletions
|
@ -698,12 +698,14 @@ L.U.Orderable = L.Evented.extend({
|
|||
},
|
||||
|
||||
onDragOver: function (e) {
|
||||
L.DomEvent.stop(e)
|
||||
if (e.preventDefault) e.preventDefault() // Necessary. Allows us to drop.
|
||||
e.dataTransfer.dropEffect = 'move'
|
||||
return false
|
||||
},
|
||||
|
||||
onDragEnter: function (e) {
|
||||
L.DomEvent.stop(e)
|
||||
// e.target is the current hover target.
|
||||
const dst = this.findTarget(e.target)
|
||||
if (!dst || dst === this.src) return
|
||||
|
|
Loading…
Reference in a new issue