fixed recording entity when switching or closing entity
This commit is contained in:
parent
cc943c5776
commit
a9e6fe2567
@ -87,7 +87,8 @@ export default {
|
||||
'detailsZoomValue',
|
||||
'reloadConcernements',
|
||||
'reloadConcernementEntites',
|
||||
'concernements_loading_nb']),
|
||||
'concernements_loading_nb',
|
||||
'concernement_is_updating_nid']),
|
||||
...mapState(CommonStore,['hover_elmt',
|
||||
'map_item_ray',
|
||||
'cartouch_width',
|
||||
@ -2630,6 +2631,12 @@ export default {
|
||||
case "superposition":
|
||||
case "action":
|
||||
// we have clicked on an entite
|
||||
// unfocus any active element to trigger recording if needed
|
||||
document.activeElement.blur();
|
||||
// setInterval to let time for editable fields to focus out and record changes
|
||||
let interval = setInterval(() => {
|
||||
if (!this.concernement_is_updating_nid) {
|
||||
clearInterval(interval);
|
||||
this.$router.push({
|
||||
name: 'concernement',
|
||||
params: {cid: this.cid, eid: result.item.item_id},
|
||||
@ -2639,6 +2646,8 @@ export default {
|
||||
},
|
||||
hash: `#${this.map_mode}`,
|
||||
});
|
||||
}
|
||||
}, 1)
|
||||
break;
|
||||
case "proximite":
|
||||
switch (result.item.item_type) {
|
||||
@ -2669,11 +2678,20 @@ export default {
|
||||
|
||||
} else {
|
||||
// otherwise we close the entite and come back to the concernement
|
||||
// unfocus any active element to trigger recording if needed
|
||||
document.activeElement.blur();
|
||||
// setInterval to let time for editable fields to focus out and record changes
|
||||
let interval = setInterval(() => {
|
||||
if (!this.concernement_is_updating_nid) {
|
||||
clearInterval(interval);
|
||||
this.$router.push({
|
||||
name: 'concernement',
|
||||
hash: `#${this.map_mode}`,
|
||||
params: {id: this.cid, mapitemid: this.id}
|
||||
});
|
||||
}
|
||||
}, 1)
|
||||
|
||||
|
||||
// reset the mousehover
|
||||
this.resetHoverElmt();
|
||||
|
Loading…
x
Reference in New Issue
Block a user