added isAnimated logic

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-10-21 17:07:45 -05:00
parent 5e8a1d349b
commit 790fa208db

View File

@ -136,6 +136,8 @@ open class ToggleBase: Control, Accessable, DataTrackable, BinaryColorable {
// MARK: - Public Properties
//--------------------------------------------------
open var isOn: Bool = false { didSet { didChange() }}
open var isAnimated: Bool = true { didSet { didChange() }}
open var showText: Bool = false { didSet { didChange() }}
@ -200,7 +202,7 @@ open class ToggleBase: Control, Accessable, DataTrackable, BinaryColorable {
let toggleColor = toggleColorConfiguration.getColor(self)
let knobColor = knobColorConfiguration.getColor(self)
if disabled {
if disabled || !isAnimated {
toggleView.backgroundColor = toggleColor
knobView.backgroundColor = knobColor
constrainKnob()