Filter event types in map visualization#150
Conversation
tarekio
left a comment
There was a problem hiding this comment.
Let's move the three dots to right next to the "Events", and add a tooltip "Show or hide event types".
…393-Filter-life-events-in-map-visualization
…ttps://github.com/sjacorg/bayanat into BYNT-1393-Filter-life-events-in-map-visualization
|
@tarekio button repositioned and tooltip added 😅 |
There was a problem hiding this comment.
There is a bug in Popup lifecycle management, scenario below,
CleanShot.2025-08-09.at.19.37.24.mp4
I think this is what's happening :
- Initial State: Markers are created with popups bound to them using
marker.bindPopup() - User Interaction: User opens a popup by clicking on a marker
- Filter Applied: User changes event type filter via the new dropdown menu
- Problem: The
selectedLocationswatcher triggersfitMarkers(), which callsthis.markerGroup.clearLayers()(line 151) - Critical Issue: This removes all markers from the map, including the marker that has an open popup
- Leaflet State Corruption: The popup remains open but its parent marker no longer exists on the map
- Animation Trigger: When user double-clicks or zooms, Leaflet tries to animate the popup position
- Error: Popup animation code tries to access
_latLngToNewLayerPoint()on a null map reference because the popup's parent marker was removed
Another UX issue is that when filtering is applied, markers are recreated and their colors change which is confusing.
…393-Filter-life-events-in-map-visualization
@level09 i reverted some changes and it should work better now |
|
Note: need to make a few more updates EDIT: Made an update to prevent line arrows from getting stuck |
Jira Issue
Description
Add a menu with all actor events. By default, let’s show all event types. We can allow the user to exclude event types as needed, and when they are removed, the visualization should be updated to remove events with those types from view.
Checklist
API Changes (if applicable)
Additional Notes
[Any other relevant information]