Skip to content

Commit

Permalink
fix: fix event name in drop util (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface authored Nov 15, 2024
2 parents 57a670d + 4acf0db commit 7de3ebd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions umap/static/umap/js/umap.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,20 +357,20 @@ U.DropControl = L.Class.extend({
L.DomEvent.off(this.dropzone, 'dragleave', this.dragleave, this)
},

dragenter: function (e) {
L.DomEvent.stop(e)
dragenter: function (event) {
L.DomEvent.stop(event)
this.map.scrollWheelZoom.disable()
this.dropzone.classList.add('umap-dragover')
},

dragover: (e) => {
L.DomEvent.stop(e)
dragover: (event) => {
L.DomEvent.stop(event)
},

drop: function (event) {
this.map.scrollWheelZoom.enable()
this.dropzone.classList.remove('umap-dragover')
L.DomEvent.stop(e)
L.DomEvent.stop(event)
for (const file of event.dataTransfer.files) {
this.map._umap.processFileToImport(file)
}
Expand Down

0 comments on commit 7de3ebd

Please sign in to comment.