Skip to content

Commit

Permalink
Refactor CodingKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
p-x9 committed Apr 4, 2024
1 parent 4627a61 commit 8c8d493
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Sources/SDCALayer/Model/Layer/JCAGradientLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ open class JCAGradientLayer: JCALayer {
public typealias Target = CAGradientLayer

private enum CodingKeys: String, CodingKey {
case colors, locations, startPoint, endPoint, type
case colors
case locations
case startPoint
case endPoint
case type
}

open override class var targetTypeName: String {
Expand Down
13 changes: 12 additions & 1 deletion Sources/SDCALayer/Model/Layer/JCAShapeLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ open class JCAShapeLayer: JCALayer {
typealias Target = CAShapeLayer

private enum CodingKeys: String, CodingKey {
case path, fillColor, fillRule, strokeColor, strokeStart, strokeEnd, lineWidth, miterLimit, lineCap, lineJoin, lineDashPhase, lineDashPattern
case path
case fillColor
case fillRule
case strokeColor
case strokeStart
case strokeEnd
case lineWidth
case miterLimit
case lineCap
case lineJoin
case lineDashPhase
case lineDashPattern
}

open override class var targetTypeName: String {
Expand Down
9 changes: 8 additions & 1 deletion Sources/SDCALayer/Model/Layer/JCATextLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ open class JCATextLayer: JCALayer {
typealias Target = CATextLayer

private enum CodingKeys: String, CodingKey {
case string, font, fontSize, foregroundColor, isWrapped, truncationMode, alignmentMode, allowsFontSubpixelQuantization
case string
case font
case fontSize
case foregroundColor
case isWrapped
case truncationMode
case alignmentMode
case allowsFontSubpixelQuantization
}

open override class var targetTypeName: String {
Expand Down

0 comments on commit 8c8d493

Please sign in to comment.