Enhanced coordinate synchronization in single mode to handle Panel actions like "Supprimer" (reset to saved values). Issues Fixed: - Marker not updating when clicking "Supprimer" button in Panel - Panel "Supprimer" restores saved coordinates but marker didn't move - No detection of programmatic field value changes Solution: - Add MutationObserver to detect attribute changes on input fields - Add 500ms polling as fallback for value detection - Add nextTick() for reactive updates to ensure proper timing - Handle coordinate reset: when invalid, return to default center - Proper cleanup with onBeforeUnmount for observers and intervals Behavior: - User changes field → marker updates immediately - User drags marker → fields update immediately - User clicks "Supprimer" → marker returns to saved position - Fields cleared → marker disappears, map resets to default center Technical Details: - MutationObserver watches 'value' attribute on lat/lon inputs - Polling checks every 500ms for changes missed by events - Watcher uses nextTick() to ensure DOM updates complete - All event listeners and observers properly cleaned up on unmount Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| code-editor | ||
| map-editor | ||
| virtual-print-page | ||
| web2print | ||