Merge branch 'bugfix/background_color' into 'release/7_6_0'

fix break to background color

See merge request BPHV_MIPS/mvm_core_ui!396
This commit is contained in:
Suresh, Kamlesh Jain 2020-04-21 11:04:20 -04:00
commit 48a51ccb14
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import Foundation
private enum CodingKeys: String, CodingKey {
case moleculeName
case backgroundColor
case spacing
case percent
case gone
@ -33,6 +34,7 @@ import Foundation
if let gone = try typeContainer.decodeIfPresent(Bool.self, forKey: .gone) {
self.gone = gone
}
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
try super.init(from: decoder)
}
@ -43,5 +45,6 @@ import Foundation
try container.encodeIfPresent(spacing, forKey: .spacing)
try container.encodeIfPresent(percent, forKey: .percent)
try container.encode(gone, forKey: .gone)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
}
}

View File

@ -48,6 +48,7 @@ import Foundation
if let spacing = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .spacing) {
self.spacing = spacing
}
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
try super.init(from: decoder)
}
@ -58,5 +59,6 @@ import Foundation
try container.encodeIfPresent(axis.rawValueString, forKey: .axis)
try container.encodeIfPresent(spacing, forKey: .spacing)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
}
}