-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text alignment logic is backwards for non-special-cases #236
Comments
prestidigitator-mt
changed the title
Renderer places text f
Renderer places text using inverse of correct padding for any positions other than 0 (left/top), 1 (right/bottom), and 0.5 (due to symmetry)
Oct 17, 2023
prestidigitator-mt
changed the title
Renderer places text using inverse of correct padding for any positions other than 0 (left/top), 1 (right/bottom), and 0.5 (due to symmetry)
Text alignment logic is backwards for non-special-cases
Oct 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Renderer (e.g. Renderer.PlaceHorizontal and Renderer.PlaceVertical) places text using inverse of correct padding for any positions other than 0 (left/top), 1 (right/bottom), and 0.5 (due to symmetry)
Setup
Please complete the following information along with version numbers, if applicable.
master
go version go1.21.1 linux/amd64
To Reproduce
Steps to reproduce the behavior:
lg_test.go
go mod init lgtest
go get github.com/charmbracelet/[email protected]
(or, at time-of-submission,go get github.com/charmbracelet/lipgloss@master
)go test .
lipgloss/position.go
Lines 83 to 85 in b0605d3
Source Code
Expected behavior
All tests pass.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: