do not bind popup to new feature – otherwise the content can be reset
This commit is contained in:
parent
5c65421096
commit
eb37ffef5a
1 changed files with 4 additions and 3 deletions
|
@ -132,9 +132,10 @@ map.on('editable:drawing:commit', function (e) {
|
||||||
currently_adding = e.layer;
|
currently_adding = e.layer;
|
||||||
$('.leaflet-editbar .current').removeClass('current');
|
$('.leaflet-editbar .current').removeClass('current');
|
||||||
e.layer.disableEdit();
|
e.layer.disableEdit();
|
||||||
e.layer.bindPopup('<img src="{% static "img/loader.gif" %}">', {
|
L.popup({
|
||||||
closeButton: false
|
closeButton: false,
|
||||||
}).openPopup();
|
autoClose: false,
|
||||||
|
}).setContent('<img src="{% static "img/loader.gif" %}">').setLatLng(e.layer.getCenter()).openOn(map);
|
||||||
console.log(e.layer.toGeoJSON());
|
console.log(e.layer.toGeoJSON());
|
||||||
}).on('editable:drawing:cancel', function (e) {
|
}).on('editable:drawing:cancel', function (e) {
|
||||||
if (currently_drawing === null && currently_adding === null) {
|
if (currently_drawing === null && currently_adding === null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue