diff --git a/Sources/Spatial/align/AlignType/AlignType+Extension.swift b/Sources/Spatial/align/AlignType/AlignType+Extension.swift index 9d95ae4..46d9866 100644 --- a/Sources/Spatial/align/AlignType/AlignType+Extension.swift +++ b/Sources/Spatial/align/AlignType/AlignType+Extension.swift @@ -4,21 +4,28 @@ import Foundation */ extension AlignType { /** - * - Fixme: ⚠️️ add doc - */ + * Extension to `AlignType` enum to provide a computed property for the axis type. + * Returns the axis type (horizontal or vertical) based on the alignment type. + */ public var axis: Axis { switch self { + // If the alignment is top, bottom, or center vertical, return vertical alignment case .top, .bottom, .centerVer: return .ver + // If the alignment is left, right, or center horizontal, return horizontal alignment case .left, .right, .centerHor: return .hor } } /** - * - Fixme: ⚠️️ add doc - */ + * Extension to `AlignType` enum to provide a computed property for the axis type. + * Returns the axis type (start, middle, or end) based on the alignment type. + */ public var axisType: AxisType { switch self { + // If the alignment is top or left, return start alignment case .top, .left: return .start + // If the alignment is center horizontal or center vertical, return middle alignment case .centerHor, .centerVer: return .middle + // If the alignment is bottom or right, return end alignment case .bottom, .right: return .end } }