RENCI / ncdot-road-safety-client

Client for NC DOT Roadway Safety Annotation Tool
0 stars 0 forks source link

Bugfix/scatterplot multiple points #125

Closed davidborland closed 3 years ago

davidborland commented 3 years ago

The issue was that when initializing data to initialFeaturePredictions, the spread operator was used to create a new object, but that performs a shallow copy, so the internal data array was being reused, and appended to with the points from the new route when a new route was selected. Fixed this by changing initialFeaturePredictions object to initializeFeaturePredictions function that returns a newly created object each time.