diff --git a/MVMCoreUI/Atomic/Atoms/Views/Arrow.swift b/MVMCoreUI/Atomic/Atoms/Views/Arrow.swift index 23bd259d..cbd80839 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Arrow.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Arrow.swift @@ -106,27 +106,25 @@ open class Arrow: View { arrowLayer.transform = CATransform3DIdentity drawShapeLayer() - if let degrees = arrowModel?.degrees { - let radians = CGFloat(degrees * Float.pi / 180) - arrowLayer.transform = CATransform3DMakeRotation(-radians, 0.0, 0.0, 1.0) - } + let radians = CGFloat(degrees * Float.pi / 180) + arrowLayer.transform = CATransform3DMakeRotation(-radians, 0.0, 0.0, 1.0) } private func drawShapeLayer() { arrowLayer.frame = bounds - arrowLayer.strokeColor = isEnabled ? arrowModel?.color.cgColor : arrowModel?.disabledColor.cgColor + arrowLayer.strokeColor = isEnabled ? color.cgColor : disabledColor.cgColor arrowLayer.fillColor = UIColor.clear.cgColor arrowLayer.path = arrowPath() arrowLayer.lineJoin = .miter arrowLayer.lineCap = .butt - arrowLayer.lineWidth = arrowModel?.lineWidth ?? 1 + arrowLayer.lineWidth = lineWidth } private func arrowPath() -> CGPath { let length = max(bounds.size.height, bounds.size.width) - let inset = (arrowModel?.lineWidth ?? 1) / 2 + let inset = lineWidth / 2 let midLength = length / 2 var startPoint = CGPoint(x: midLength, y: inset)