Skip to content

Commit 5a9ee2b

Browse files
committed
added animationType to clock hand options. optional and might require using clockology app as a guide
1 parent efa26bf commit 5a9ee2b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Check out the JSON in json folder
2424
This layout is used for example JSON in the /json folder. It uses all the supported layer types and has options added for each layer to store the properties.
2525

2626
![Example Image](images/Examples.JPG)
27+
28+

swift/OpenClockStandard/ClockStandard.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ public struct ClockLayerDataBarOptions: Codable {
129129

130130
public struct ClockLayerHandOptions: Codable {
131131

132-
public init(handType: ClockLayerHandTypes = .hour, handStyle: String = "plain", handStyleDescription: String = "", useImage: Bool = false, animateClockwise: Bool = true, imageAnchorX: String = "", imageAnchorY: String = "") {
132+
public init(handType: ClockLayerHandTypes = .hour, handStyle: String = "plain", handStyleDescription: String = "", animationType: String = "", useImage: Bool = false, animateClockwise: Bool = true, imageAnchorX: String = "", imageAnchorY: String = "") {
133133
self.handType = handType
134134
self.handStyle = handStyle
135135
self.handStyleDescription = handStyleDescription
136+
self.animationType = animationType
136137
self.useImage = useImage
137138
self.animateClockwise = animateClockwise
138139
self.imageAnchorX = imageAnchorX
@@ -149,6 +150,7 @@ public struct ClockLayerHandOptions: Codable {
149150
SecondHandTypeImageMoon, SecondHandTypeImageNumbers,
150151
SecondHandNodeTypeNone,SecondHandTypeImageSubmariner,SecondHandGallery */
151152
public var handStyleDescription: String = "" // localized text description of the hand style
153+
public var animationType: String = "" // will be specific to platforms, might want to ignore
152154
public var useImage: Bool = false // use images instead of vectors
153155
public var animateClockwise: Bool = true //used usually in combination with images that have numbers to animate in reverse to show numbers increasing for time
154156
public var imageAnchorX: String = "" //when using images the anchor position ( bottom / centered of the image ) default: 0.5

0 commit comments

Comments
 (0)