Skip to content

Commit

Permalink
Fix an issue where some annotations were placed in a wrong location.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdhejazi committed Jun 25, 2020
1 parent 263c2f4 commit 871ddc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Corona/Model/Region.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ extension Region {
guard let firstRegion = subRegions.first else { return nil }

/// Set the location to the center point between the two most affected sub regions
let location = Coordinate.center(of: subRegions.sorted().suffix(2).map { $0.location })
let location = Coordinate.center(of: subRegions.filter { !$0.location.isZero }.sorted().suffix(2).map { $0.location })

let region = Region(level: firstRegion.level.parent,
name: firstRegion.parentName ?? "N/A",
Expand Down

0 comments on commit 871ddc1

Please sign in to comment.