default
This commit is contained in:
parent
572968f193
commit
77c6396034
@ -20,8 +20,6 @@ open class LoadingSpinner: View {
|
||||
|
||||
public var speed: Float = 1.5
|
||||
|
||||
public var defaultDimension: CGFloat = 40
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Constraints
|
||||
//--------------------------------------------------
|
||||
@ -198,7 +196,7 @@ open class LoadingSpinner: View {
|
||||
|
||||
strokeColor = model.strokeColor.uiColor
|
||||
lineWidth = model.lineWidth
|
||||
pinWidthAndHeight(diameter: model.diameter ?? defaultDimension)
|
||||
pinWidthAndHeight(diameter: model.diameter)
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
|
||||
@ -18,7 +18,7 @@ open class LoadingSpinnerModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "loadingSpinner"
|
||||
public var strokeColor = Color(uiColor: .mvmBlack)
|
||||
public var lineWidth: CGFloat = 3
|
||||
public var diameter: CGFloat?
|
||||
public var diameter: CGFloat = 40
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
@ -40,7 +40,10 @@ open class LoadingSpinnerModel: MoleculeModelProtocol {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
diameter = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .diameter)
|
||||
|
||||
if let diameter = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .diameter) {
|
||||
self.diameter = diameter
|
||||
}
|
||||
|
||||
if let strokeColor = try typeContainer.decodeIfPresent(Color.self, forKey: .strokeColor) {
|
||||
self.strokeColor = strokeColor
|
||||
|
||||
Loading…
Reference in New Issue
Block a user