Skip to content

Commit

Permalink
Implement automatic deselection upon settings VC dismissal
Browse files Browse the repository at this point in the history
  • Loading branch information
captainbarbosa committed Aug 14, 2019
1 parent f61d414 commit 1341b3f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,22 @@ extension MapViewController: AnnotationStyleSettingsDelegate {
func didUpdateStyleAnnotation(with updatedAnnotation: MGLStyleAnnotation) {
if updatedAnnotation is MGLCircleStyleAnnotation {
circleAnnotationController.updateStyleAnnotation(updatedAnnotation)
circleAnnotationController.deselectStyleAnnotation(updatedAnnotation)
}

if updatedAnnotation is MGLSymbolStyleAnnotation {
symbolAnnotationController.updateStyleAnnotation(updatedAnnotation)
symbolAnnotationController.deselectStyleAnnotation(updatedAnnotation)
}

if updatedAnnotation is MGLLineStyleAnnotation {
lineAnnotationController.updateStyleAnnotation(updatedAnnotation)
lineAnnotationController.deselectStyleAnnotation(updatedAnnotation)
}

if updatedAnnotation is MGLPolygonStyleAnnotation {
polygonAnnotationController.updateStyleAnnotation(updatedAnnotation)
polygonAnnotationController.deselectStyleAnnotation(updatedAnnotation)
}
}
}

0 comments on commit 1341b3f

Please sign in to comment.