Skip to content

Commit d446629

Browse files
committed
Remove 'no motion' marker support for now until we identity a use case
1 parent c9c141e commit d446629

File tree

4 files changed

+1
-30
lines changed

4 files changed

+1
-30
lines changed

Sources/Public/Animation/LottieAnimation.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,23 +176,4 @@ public final class LottieAnimation: Codable, DictionaryInitializable {
176176
allowedReducedMotionMarkerNames.contains(marker.name.lowercased())
177177
})
178178
}()
179-
180-
/// The marker to use if "no motion" is enabled.
181-
/// Supported marker names are case insensitive, and include:
182-
/// - no motion
183-
/// - noMotion
184-
/// - no_motion
185-
/// - no-motion
186-
lazy private(set) var noMotionMarker: Marker? = {
187-
let allowedNoMotionMarkerNames = Set([
188-
"no motion",
189-
"no_motion",
190-
"no-motion",
191-
"nomotion",
192-
])
193-
194-
return markers?.first(where: { marker in
195-
allowedNoMotionMarkerNames.contains(marker.name.lowercased())
196-
})
197-
}()
198179
}

Sources/Public/Animation/LottieAnimationLayer.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,6 @@ public class LottieAnimationLayer: CALayer {
12801280
return nil
12811281
case .reducedMotion:
12821282
return animation?.reducedMotionMarker
1283-
case .noMotion:
1284-
return animation?.noMotionMarker
12851283
}
12861284
}
12871285

Sources/Public/Configuration/ReducedMotionOption.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ extension ReducedMotionOption {
3030
/// - Valid marker names include "reduced motion", "reducedMotion", "reduced_motion" (case insensitive).
3131
public static var reducedMotion: ReducedMotionOption { .specific(.reducedMotion) }
3232

33-
/// Lottie animations with a "no motion" marker will play that marker instead of any other animations.
34-
/// By default this mode is never used on iOS, but is used on some other platforms.
35-
/// - Valid marker names include "no motion", "noMotion", "no_motion" (case insensitive).
36-
public static var noMotion: ReducedMotionOption { .specific(.noMotion) }
37-
3833
/// A `ReducedMotionOptionProvider` that returns `.reducedMotion` when
3934
/// the system `UIAccessibility.isReduceMotionEnabled` option is `true`.
4035
/// This is the default option of `LottieConfiguration`.
@@ -89,9 +84,6 @@ public enum ReducedMotionMode: Hashable {
8984
/// Lottie animations with a "reduced motion" marker will play that marker instead of any other animations.
9085
/// By default this mode is used when the system "reduced motion" option is enabled.
9186
case reducedMotion
92-
93-
/// Lottie animations with a "no motion" marker will play that marker instead of any other animations.
94-
case noMotion
9587
}
9688

9789
// MARK: - ReducedMotionOptionProvider

Sources/Public/iOS/LottieAnimationViewBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ open class LottieAnimationViewBase: UIView {
3737
layer
3838
}
3939

40-
var screenScale: CGFloat {
40+
var screenScale: CGFloat {
4141
UIScreen.main.scale
4242
}
4343

0 commit comments

Comments
 (0)