From 0f4a97b49cbb2b1160a736b23d230193a1e25961 Mon Sep 17 00:00:00 2001 From: Xi Zhang Date: Wed, 17 Jul 2024 14:35:55 -0400 Subject: [PATCH] Set the default value of duration to 0 to disable the animation by default following confluence page. --- MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift | 2 +- MVMCoreUI/Atomic/Atoms/Views/CircularProgressBarModel.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift index 09009a57..835a1def 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift @@ -65,7 +65,7 @@ import UIKit tracklayer.strokeColor = trackColor.cgColor // show circular progress view with animation. - showProgressWithAnimation(duration: graphModel?.duration ?? 1.0, value: Float(graphModel?.percent ?? 0) / 100) + showProgressWithAnimation(duration: graphModel?.duration ?? 0, value: Float(graphModel?.percent ?? 0) / 100) // show progress percentage label. if let drawText = model.drawText, drawText { diff --git a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBarModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBarModel.swift index 61c503f6..b2f37e68 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBarModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBarModel.swift @@ -18,7 +18,7 @@ public class CircularProgressBarModel: GraphSizeBase, MoleculeModelProtocol { public var percent: Int = 0 public var diameter: CGFloat? = 64 public var lineWidth: CGFloat? = 4 - public var duration : Double? = 1.0 + public var duration : Double? = 0 public var color: Color? = Color(uiColor: UIColor.mfGet(forHex: "#007AB8")) public var trackColor: Color? = Color(uiColor: .mvmCoolGray3) public var drawText: Bool? = true