Digital ACT-191 ONEAPP-9314 story: added missed comments

This commit is contained in:
Vasavi Kanamarlapudi 2024-08-15 16:55:55 +05:30
parent 1bd58256f7
commit e5d9f77d3d

View File

@ -153,6 +153,7 @@ open class PriceLockup: View {
//-------------------------------------------------- //--------------------------------------------------
internal var containerSize: CGSize { CGSize(width: 45, height: 44) } internal var containerSize: CGSize { CGSize(width: 45, height: 44) }
// TextStyle for the size.
private var textStyle: TextStyle.StandardStyle { private var textStyle: TextStyle.StandardStyle {
switch (size, textPosition) { switch (size, textPosition) {
case (.xxxsmall, .preDelimiter), (.xxxsmall, .postDelimiter): case (.xxxsmall, .preDelimiter), (.xxxsmall, .postDelimiter):
@ -228,6 +229,7 @@ open class PriceLockup: View {
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Private Methods // MARK: - Private Methods
//-------------------------------------------------- //--------------------------------------------------
// Update PriceLockup text attributes
func updateLabelAttributes() { func updateLabelAttributes() {
var attributes: [any LabelAttributeModel] = [] var attributes: [any LabelAttributeModel] = []
attributes.append(ColorLabelAttribute(location: 0, attributes.append(ColorLabelAttribute(location: 0,
@ -242,6 +244,7 @@ open class PriceLockup: View {
textStyle: bold ? textStyle.bold : textStyle.regular, textStyle: bold ? textStyle.bold : textStyle.regular,
textPosition: .left)) textPosition: .left))
attributes.append(StrikeThroughLabelAttribute(location:strikethroughLocation, length: strikethroughLength)) attributes.append(StrikeThroughLabelAttribute(location:strikethroughLocation, length: strikethroughLength))
} else if uniformSize { } else if uniformSize {
// currency and value have the same font text style as delimeter, term, trailing text and superscript. // currency and value have the same font text style as delimeter, term, trailing text and superscript.
@ -249,6 +252,7 @@ open class PriceLockup: View {
length: priceLockupLabel.text.count, length: priceLockupLabel.text.count,
textStyle: bold ? textStyle.bold : textStyle.regular, textStyle: bold ? textStyle.bold : textStyle.regular,
textPosition: .left)) textPosition: .left))
} else { } else {
// size updates relative to predelimiter, postdelimiter // size updates relative to predelimiter, postdelimiter
@ -269,6 +273,7 @@ open class PriceLockup: View {
priceLockupLabel.attributes = attributes priceLockupLabel.attributes = attributes
} }
// Get text for PriceLockup.
open func fetchText() -> String { open func fetchText() -> String {
var text : String = "" var text : String = ""
let space = " " let space = " "