diff --git a/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/Order Tracker/OrderTracker.swift b/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/Order Tracker/OrderTracker.swift index af66cc8f..9963ea37 100644 --- a/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/Order Tracker/OrderTracker.swift +++ b/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/Order Tracker/OrderTracker.swift @@ -106,17 +106,18 @@ open class OrderTracker: View { } context.setStrokeColor(lineColor) - let relativeOrigin = convert(step.stateImage.frame, from: step.stateImage) - let point = CGPoint(x: halfDimension, y: relativeOrigin.origin.y + halfDimension) + let relativeRect = convert(step.stateImage.frame, from: step.stateImage) + let point = CGPoint(x: halfDimension, y: relativeRect.origin.y + halfDimension) context.addLine(to: point) context.strokePath() + // Break out of loop since we're on the last step. if i == steps.count - 2 { break } - let nextPoint = CGPoint(x: halfDimension, y: relativeOrigin.origin.y + imageDimension) + let nextPoint = CGPoint(x: halfDimension, y: relativeRect.origin.y + halfDimension) lineColor = (step.state?.color() ?? defaultGrey).cgColor context.move(to: nextPoint) }