Skip to content

Commit

Permalink
♻️ Update animation duration to parse from milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaatttt committed Apr 11, 2023
1 parent 5d74324 commit 690c885
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit

internal class AppcuesStepTransitionAnimationTrait: ContainerDecoratingTrait {
struct Config: Decodable {
let duration: Double?
let duration: Int?
let easing: Easing?
}

Expand All @@ -23,7 +23,7 @@ internal class AppcuesStepTransitionAnimationTrait: ContainerDecoratingTrait {

required init?(configuration: ExperiencePluginConfiguration, level: ExperienceTraitLevel) {
let config = configuration.decode(Config.self)
self.duration = config?.duration ?? 0.3
self.duration = Double(config?.duration ?? 300) / 1_000
self.easing = config?.easing ?? .linear
}

Expand Down

0 comments on commit 690c885

Please sign in to comment.