fix marker duplication bug when editing a newly added place

This commit is contained in:
Sanjay Bhangar 2025-08-09 17:11:18 +02:00
commit 8fc5297f39
4 changed files with 34 additions and 1 deletions

View file

@ -225,11 +225,18 @@ Ox.MapRectangle = function(options) {
setOptions();
function click(e) {
console.log('RECTANGLE CLICK DEBUG:');
console.log('- map.editable:', that.map.options('editable'));
console.log('- place.editable:', that.place.editable);
console.log('- place.editing:', that.place.editing);
console.log('- place object:', that.place);
if (
that.map.options('editable')
&& that.place.editable
&& !that.place.editing
) {
console.log('- Calling place.edit()');
that.place.edit();
} else if (that.map.getKey() == 'meta') {
that.place.submit();