Skip to content

Commit 277056a

Browse files
WIP
1 parent 21542f3 commit 277056a

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

Sources/StitchSchemaKit/V20/Node/Layer/LayerNodeEntity_V20.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,10 @@ extension LayerNodeEntity_V20.LayerNodeEntity: StitchVersionedCodable {
407407
bottom: x.z,
408408
left: x.w))
409409
default:
410-
return .padding(.init())
410+
return .padding(.init(top: .zero,
411+
right: .zero,
412+
bottom: .zero,
413+
left: .zero))
411414
}
412415
})
413416
),

Sources/StitchSchemaKit/V20/PortValueTypes/StitchPadding_V20.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ public enum StitchPadding_V20: StitchSchemaVersionable {
1616

1717
// TODO: combine with Point4D ? Or will the names `x, y, z, w` be too unfamiliar vers `top`, `bottom` etc.; e.g. does `x` refer to `left` or `right`?
1818
public struct StitchPadding: Equatable, Hashable, Codable {
19-
public var top: CGFloat = .zero
20-
public var right: CGFloat = .zero
21-
public var bottom: CGFloat = .zero
22-
public var left: CGFloat = .zero
19+
public var top: CGFloat
20+
public var right: CGFloat
21+
public var bottom: CGFloat
22+
public var left: CGFloat
23+
24+
public init(top: Double,
25+
right: Double,
26+
bottom: Double,
27+
left: Double) {
28+
self.top = top
29+
self.right = right
30+
self.bottom = bottom
31+
self.left = left
32+
}
2333
}
2434
}
2535

0 commit comments

Comments
 (0)