14 Commits

Author SHA1 Message Date
Adlai Holler
3f77a3d46c More Percent -> Fraction 2016-08-11 10:37:48 -07:00
Adlai Holler
eb9f86cfdb Replace "percent" with "fraction" where appropriate 2016-08-10 10:26:21 -07:00
Scott Goodson
589efefcf2 [ASDimension] Disable assertions for Percent values being between 0.0 and 1.0.
This triggers on existing code that needs to be updated, but also there is some investigation
needed as to whether it is a valid use case to have a >1.0 value in order to position greater-than-bounds elements.
2016-07-30 23:44:46 -07:00
Hannah Troisi
ff2c47c415 add assertion for ASRelativeDimensionTypePercent value to be between 0-1 (#2009) 2016-07-29 10:38:20 -07:00
Michael Schneider
729766a365 Add convenience functions to create relative sizes with percentage 2016-07-15 10:51:45 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Eric Jensen
33fda7ab49 - Use modern Objective-C syntax.
-  Simplify comparisons.
-  Remove dead stores.
2016-03-15 22:34:29 -07:00
Levi McCallum
52391dcc27 Change method name in implementation 2016-03-09 10:42:56 -08:00
Levi McCallum
d4a0c34d86 Add ASSizeRangeMakeWithExactCGSize method 2016-03-09 10:39:46 -08:00
rcancro
c6f4aff4ef Do not round when resolving relative dimensions
When laying out a node I got to a point where the constrained width was min 132.22222pts and max width was 100%. When resolving the relative size to pts it rounded to 132pt. This caused an assert in ASSizeRangeMake because the min width (132.222pt) was bigger than the max width (132pt)
2015-12-17 15:20:40 -08:00
Huy Nguyen
99fe79339d Simplify ASDimension:
- ASRelativeSize and ASRelativeSizeRange are used only by ASStaticLayoutNode. They are declared in a standalone header.
- ASDimension contains a minimal set of new size types required to use the common layouts. Thus minimize the learning curve.
2015-06-25 11:36:02 +07:00
Huy Nguyen
259bbf22bc Fix naming conventions on equal and resolve methods of new size types. 2015-06-25 11:34:37 +07:00
Huy Nguyen
93564899fd Remove Auto size type. 2015-06-25 11:34:37 +07:00
Huy Nguyen
f8531f467d Add Layout nodes.
- The code is forked from LayoutComponents in ComponentKit.
- Public interfaces are modified to be strictly Objective-C. As a result, users are not forced to switch to Objective-C++, the linker can happily compile and Swift fans can continue using the mighty ASDK.
2015-06-25 11:32:30 +07:00