Description
Description:
When adding a large GeoJSON line feature (e.g., complex geometries with thousands of vertices) to Mapbox-GL-Draw, selecting the feature and clicking on any of its vertices causes the layer to flicker and deselect the feature. The expected behavior is for the clicked vertex to be selected and remain interactive without losing the feature's selection state.
Steps to Reproduce:
Load a large GeoJSON line feature (e.g., a polyline with high vertex density) into Mapbox-GL-Draw.
Select the feature using draw.set({ }) or by clicking it.
Click on any vertex of the selected feature.
Expected Result:
The clicked vertex is highlighted, and the feature remains selected for further interactions (e.g., vertex drag-and-drop or deletion).
Actual Result:
The feature briefly flickers.
The selection state is lost (feature and vertex deselection).
The interaction requires reselecting the feature to proceed.
Environment:
Mapbox-GL-Draw version: [e.g., 1.4.2]
Mapbox-GL-JS version: [e.g., 1.13.0]
Browser: [e.g., Chrome 120, Firefox 115]
OS: [e.g., Windows 10,]
Additional Context:
Issue is more prominent with large datasets but may also occur with moderately complex geometries.
No console errors observed, suggesting a rendering/state synchronization issue. #