Default message when drawing an existing line/shape

This commit is contained in:
David Larlet 2023-10-27 13:49:26 -04:00
parent 4250712741
commit 539175f89c
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -314,24 +314,23 @@ L.U.DrawToolbar = L.Toolbar.Control.extend({
})
L.U.DropControl = L.Class.extend({
initialize: function (map) {
this.map = map
this.dropzone = map._container
},
enable: function () {
L.DomEvent.on(this.dropzone, "dragenter", this.dragenter, this)
L.DomEvent.on(this.dropzone, "dragover", this.dragover, this)
L.DomEvent.on(this.dropzone, "drop", this.drop, this)
L.DomEvent.on(this.dropzone, "dragleave", this.dragleave, this)
L.DomEvent.on(this.dropzone, 'dragenter', this.dragenter, this)
L.DomEvent.on(this.dropzone, 'dragover', this.dragover, this)
L.DomEvent.on(this.dropzone, 'drop', this.drop, this)
L.DomEvent.on(this.dropzone, 'dragleave', this.dragleave, this)
},
disable: function () {
L.DomEvent.off(this.dropzone, "dragenter", this.dragenter, this)
L.DomEvent.off(this.dropzone, "dragover", this.dragover, this)
L.DomEvent.off(this.dropzone, "drop", this.drop, this)
L.DomEvent.off(this.dropzone, "dragleave", this.dragleave, this)
L.DomEvent.off(this.dropzone, 'dragenter', this.dragenter, this)
L.DomEvent.off(this.dropzone, 'dragover', this.dragover, this)
L.DomEvent.off(this.dropzone, 'drop', this.drop, this)
L.DomEvent.off(this.dropzone, 'dragleave', this.dragleave, this)
},
dragenter: function (e) {
@ -357,8 +356,7 @@ L.U.DropControl = L.Class.extend({
dragleave: function () {
this.map.scrollWheelZoom.enable()
this.dropzone.classList.remove('umap-dragover')
}
},
})
L.U.EditControl = L.Control.extend({
@ -1744,7 +1742,7 @@ L.U.Editable = L.Editable.extend({
return
}
let content
let content = L._('Drawing')
let measure
if (e.layer.editor._drawnLatLngs) {
// when drawing (a Polyline or Polygon)