tonywchen / toronto-traffic

0 stars 0 forks source link

Fix additional bug when unselect path after time change #15

Closed tonywchen closed 3 years ago

tonywchen commented 3 years ago

Problem There is another bug when unselecting a path if the currently displayed time has changed since the user selects the path.

Cause To indicate whether a path is being selected or unselected on the Mapbox map, the code must set:

Previously, a feature was added to allow a selected path to remain selected even when the user changes the currently displayed time. The change involves updating the source id, which is the time-dependent part of the data.

However, an earlier refactor updates the source id to the wrong field.

Fix Ensure the source id is updated properly