Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to remove trailHeadMarkers array #132

Open
anselmbradford opened this issue May 20, 2014 · 0 comments
Open

Refactor to remove trailHeadMarkers array #132

anselmbradford opened this issue May 20, 2014 · 0 comments

Comments

@anselmbradford
Copy link
Member

Currently, there is a trailHeadMarkers array in the controller, which is used to store references to the trailheads marker is used to find the correct marker when the trailhead model modified. Ideally, the trailhead markers would be able to be associated with the model directly. Without a direct association, the trailHeadMarkers array is looped through to find the trailhead marker for a model in $scope.$watch('selectedTrailHead'. It's also used in the moveMarkerToMap and moveMarkerToCluster, which are used to move a marker to and from a marker cluster so that the selected trailhead doesn't get combined with a cluster when zooming out. These are both expensive methods that would benefit from this refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants