From 5894387fd1a92be7f06d97552737f2f0dbab1ab2 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Mon, 13 Jul 2020 16:16:42 -0400 Subject: [PATCH] smoothing out the lines --- .../Order Tracker/OrderTracker.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) }