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;
|
||||
$('.leaflet-editbar .current').removeClass('current');
|
||||
e.layer.disableEdit();
|
||||
e.layer.bindPopup('<img src="{% static "img/loader.gif" %}">', {
|
||||
closeButton: false
|
||||
}).openPopup();
|
||||
L.popup({
|
||||
closeButton: false,
|
||||
autoClose: false,
|
||||
}).setContent('<img src="{% static "img/loader.gif" %}">').setLatLng(e.layer.getCenter()).openOn(map);
|
||||
console.log(e.layer.toGeoJSON());
|
||||
}).on('editable:drawing:cancel', function (e) {
|
||||
if (currently_drawing === null && currently_adding === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue