well functioning
This commit is contained in:
parent
fa439855b0
commit
b758c0d514
@ -92,16 +92,19 @@ open class OrderTracker: View {
|
||||
let startPoint = CGPoint(x: imageDimension / 2, y: firstRect.size.height - 1)
|
||||
context.move(to: startPoint)
|
||||
|
||||
var lineColor = (firstStep.state?.color() ?? .mvmCoolGray3).cgColor
|
||||
|
||||
for step in steps.dropFirst() {
|
||||
|
||||
context.setStrokeColor((step.state?.color() ?? .mvmCoolGray3).cgColor)
|
||||
context.setStrokeColor(lineColor)
|
||||
let relativeOrigin = convert(step.stateImage.frame, from: step.stateImage)
|
||||
let point = CGPoint(x: imageDimension / 2, y: relativeOrigin.origin.y)
|
||||
let point = CGPoint(x: imageDimension / 2, y: relativeOrigin.origin.y + 1)
|
||||
|
||||
context.addLine(to: point)
|
||||
context.strokePath()
|
||||
|
||||
let nextPoint = CGPoint(x: imageDimension / 2, y: relativeOrigin.origin.y + imageDimension)
|
||||
lineColor = (step.state?.color() ?? .mvmCoolGray3).cgColor
|
||||
context.move(to: nextPoint)
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ open class Step: View {
|
||||
addSubview(bodyTop)
|
||||
addSubview(bodyBottom)
|
||||
|
||||
stateImage.contentMode = .scaleToFill
|
||||
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
|
||||
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
|
||||
stateImage.heightAnchor.constraint(equalToConstant: 18).isActive = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user