diff --git a/MVMCoreUI/Atoms/Views/LineModel.swift b/MVMCoreUI/Atoms/Views/LineModel.swift index 8f16d22e..f481d4d5 100644 --- a/MVMCoreUI/Atoms/Views/LineModel.swift +++ b/MVMCoreUI/Atoms/Views/LineModel.swift @@ -43,6 +43,7 @@ import UIKit public static var identifier: String = "line" public var type: Style = .standard public var frequency: Frequency? = .allExceptTop + public var color: Color? public var backgroundColor: Color? public init(type: Style) { @@ -53,6 +54,7 @@ import UIKit case moleculeName case type case backgroundColor + case color case frequency } @@ -64,7 +66,7 @@ import UIKit if let frequency = try typeContainer.decodeIfPresent(Frequency.self, forKey: .frequency) { self.frequency = frequency } - backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) + color = try typeContainer.decodeIfPresent(Color.self, forKey: .color) } public func encode(to encoder: Encoder) throws { @@ -72,6 +74,6 @@ import UIKit try container.encode(moleculeName, forKey: .moleculeName) try container.encode(type, forKey: .type) try container.encodeIfPresent(frequency, forKey: .frequency) - try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) + try container.encodeIfPresent(color, forKey: .color) } }