Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Source/Classes/Drawing/Drawing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ extension NantesLabel {
let lineWidth: CGFloat = attributes[.nantesLabelBackgroundLineWidth] as? CGFloat ?? 0.0

guard strokeColor != nil || fillColor != nil else {
lineIndex += 1
continue
}

Expand All @@ -199,7 +198,7 @@ extension NantesLabel {
runBounds.origin.y = origins[lineIndex].y + rect.origin.y - fillPadding.bottom - rect.origin.y - runDescent

// We don't want to draw too far to the right
runBounds.size.width = runBounds.width > width ? width : runBounds.width
runBounds.size.width = runBounds.width > width + fillPadding.left + fillPadding.right ? width + fillPadding.left + fillPadding.right : runBounds.width

let roundedRect = runBounds.inset(by: linkBackgroundEdgeInset).insetBy(dx: lineWidth, dy: lineWidth)
let path: CGPath = UIBezierPath(roundedRect: roundedRect, cornerRadius: cornerRadius).cgPath
Expand Down