editor: if creating a new polygon, hide save button until the geometry is complete
This commit is contained in:
parent
a4c5651675
commit
779d2fa2f5
2 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,9 @@ body {
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position:center;
|
background-position:center;
|
||||||
}
|
}
|
||||||
|
#mapeditcontrols form.creation-lock .btn.btn-primary {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
#mapeditcontrols h3 {
|
#mapeditcontrols h3 {
|
||||||
margin-top:5px;
|
margin-top:5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,6 +274,7 @@ editor = {
|
||||||
editor._editing.enableEdit();
|
editor._editing.enableEdit();
|
||||||
} else if (form.is('[data-geomtype]')) {
|
} else if (form.is('[data-geomtype]')) {
|
||||||
// create new geometry
|
// create new geometry
|
||||||
|
form.addClass('creation-lock');
|
||||||
var geomtype = form.attr('data-geomtype');
|
var geomtype = form.attr('data-geomtype');
|
||||||
|
|
||||||
var options = editor._get_mapitem_type_style(mapitem_type);
|
var options = editor._get_mapitem_type_style(mapitem_type);
|
||||||
|
@ -326,6 +327,7 @@ editor = {
|
||||||
editor._editing.addTo(editor._editing_layer);
|
editor._editing.addTo(editor._editing_layer);
|
||||||
editor._editing.on('click', editor._click_editing_layer);
|
editor._editing.on('click', editor._click_editing_layer);
|
||||||
editor._update_editing();
|
editor._update_editing();
|
||||||
|
$('#mapeditcontrols').find('form.creation-lock').removeClass('creation-lock');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_update_editing: function () {
|
_update_editing: function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue