Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Commit 36f2ccd

Browse files
authored
Merge pull request #114 from natmark/fix_text_align_right
Fix textAlign(.right)
2 parents 6a591d2 + 0dc0d72 commit 36f2ccd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ProcessingKit/Core/Typography/Text.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ public struct TextModel: TextModelContract {
5656
if self.textComponents.textAlignX == .center {
5757
self.text(str, x - width / 2, y, width, height)
5858
return
59+
} else if self.textComponents.textAlignX == .right {
60+
self.text(str, x - width, y, width, height)
61+
return
5962
}
63+
6064
self.text(str, x, y, width, height)
6165
}
6266

0 commit comments

Comments
 (0)