Skip to content

Commit

Permalink
fixed broken corner in case the corner is very close to an edge but n…
Browse files Browse the repository at this point in the history
…ot exactly at that edge yet
  • Loading branch information
vitalii-tym committed Nov 4, 2019
1 parent 213f9cf commit b1b7365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Popover.swift
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,11 @@ private extension Popover {
}

var isCornerLeftArrow: Bool {
return self.arrowShowPoint.x == self.frame.origin.x
return self.arrowShowPoint.x <= self.frame.origin.x + arrowSize.width + cornerRadius
}

var isCornerRightArrow: Bool {
return self.arrowShowPoint.x == self.frame.origin.x + self.bounds.width
return self.arrowShowPoint.x >= (self.frame.origin.x + self.bounds.width) - arrowSize.width - cornerRadius
}

func radians(_ degrees: CGFloat) -> CGFloat {
Expand Down

0 comments on commit b1b7365

Please sign in to comment.