Merge branch 'bugfix/ListRightVariableRightCaretAllTextAndLinks' into 'develop'

bug fix ListRightVariableRightCaretAlltextAndLinks

See merge request BPHV_MIPS/mvm_core_ui!653
This commit is contained in:
Pfeil, Scott Robert 2021-01-13 09:53:01 -05:00
commit 573629b897

View File

@ -21,7 +21,8 @@
//--------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .leading)), (view: rightLabel, model: StackItemModel(horizontalAlignment:.fill))], axis: .horizontal)
// Fill for left vertical alignment because bottom constraint was breaking with leading. CXTDT-145456
stack = Stack<StackModel>.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment:.fill, verticalAlignment: .leading))], axis: .horizontal)
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
@ -47,7 +48,7 @@
if let heroCenter = heroCenter,
let stackItem = stack.stackItems.last as? StackItem {
let convertedPoint = stack.convert(heroCenter, from: self)
stackItem.containerHelper.alignCenterVerticalConstraint?.constant = convertedPoint.y - stack.bounds.midY
stackItem.containerHelper.topConstraint?.constant = max(convertedPoint.y - rightLabel.bounds.midY, 0.0)
}
return heroCenter
@ -61,7 +62,6 @@
super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListRightVariableRightCaretAllTextAndLinksModel else { return }
rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
eyebrowHeadlineBodyLink.set(with: model.eyebrowHeadlineBodyLink, delegateObject, additionalData)
updateAccessibilityLabel()