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

Documentation: Graphics.Element (absolute, relative) #186

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@justinmanley

justinmanley commented Mar 5, 2015

It was unclear to me how different types of Positions (Absolute Int vs Relative Float), so I added a note to the documentation.

It's a bit confusing. As it turns out, the important difference is not int vs. float, but how the number is interpreted. Absolute positions are interpreted as pixel values, while Relative positions are interpreted as percentage values.

See https://github.com/elm-lang/core/blob/abcb93e93a263cdd8fda739735f87974dc63729a/src/Native/Graphics/Element.js#L221 to understand how Absolute / Relative values are used in the native code.

evancz pushed a commit that referenced this pull request Nov 19, 2015

@evancz evancz closed this Nov 19, 2015

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Nov 19, 2015

Member

I added in something along these lines (it wouldn't merge properly) so hopefully what I ended up is good enough now. Thanks for pointing this out!

Member

evancz commented Nov 19, 2015

I added in something along these lines (it wouldn't merge properly) so hopefully what I ended up is good enough now. Thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment