23 Commits

Author SHA1 Message Date
Michael Schneider
bc0443db02 Don’t floor space between items for ASStackLayoutJustifyContentSpaceBetween and ASStackLayoutJustifyContentSpaceAround 2016-11-17 18:05:22 -08:00
Michael Schneider
94f958c4a3 [Layout] Treat flex factors as true factors (#2349)
* Treat flex factors as factors

* Add snapshot tests

* Address comments
2016-10-06 16:53:26 -04:00
Michael Schneider
d6e5e27c39 [Layout] Add helper properties for setting sizes via CGSize and ASRelativeSize (#2324)
* Remove set layout style size helper

* Update API to set and get a CGSize / ASRelativeSize from an ASLayoutElementStyle

- Expose ASRelativeSize type
- Add new helper properties to set a size / relative size to ASLayoutElementStyle
- Don't expose the size in ASLayoutElementStyle anymore and move into ASLayoutElementStylePrivate

* Update examples

* Update comments for size helpers
2016-10-04 12:35:45 -04:00
Hannah Troisi
7551627b58 [Layout] Rename ASLayoutable to ASLayoutElement (#2290)
* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* fix wrapperWithLayoutElement

* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* address Michael's comments

* Remove ASLayoutValidation files that were deleted on master since this diff was created.
2016-09-29 00:02:47 -07:00
Michael Schneider
e85583523f [Layout] Add support for flex factor (#2298)
* Add support for flex factor

* Add snapshot tests

* Respect child specified size from ASLayoutable

* Add new snapshot test images

* Fix rebase conflict
2016-09-27 18:39:50 -04:00
Michael Schneider
75dca556e6 [Layout] Add style property to ASLayoutable (#2261)
* Add style property to ASLayoutable

* Add styles property to further layout specs

* Adjust some examples

* Add `loadStyle` to create the style object in a ASLayoutable

* Revert "Add `loadStyle` to create the style object in a ASLayoutable"

This reverts commit 2b7240f2c7dc993e38cadf290cfdf08482dd70c7.

* Revert "Adjust some examples"

This reverts commit 3254ae0a321e75db3ecfa80adee9d96bde93a33d.

* Revert "Add styles property to further layout specs"

This reverts commit c779dcb876ead27122c1af1300146a6ad36912cb.

* Rename ASLayoutableStyleDeclaration to ASLayoutableStyle

* Add styleClass class property for extensibility support of the ASLayoutable style object

* flexShrink should not be YES by default
2016-09-22 16:00:52 -07:00
Michael Schneider
8427083ddb Set default value of flexShrink to NO (#2270) 2016-09-21 13:17:35 -07:00
Adlai Holler
c7b290e4cb Fix snapshot unit test merge issue 2016-09-14 11:31:45 -07:00
Adlai Holler
bba71d05f0 Set .flexShrink to YES by default (#2247)
To align with the CSS flex-shrink spec, set the default value of flexShrink to YES: http://www.w3.org/TR/css-flexbox-1/#propdef-flex-shrink
2016-09-14 11:24:24 -07:00
Michael Schneider
8897614f0e [Layout] Layout API based on content area (#2110)
* Initial commit for adding a size constraint to ASLayoutable's

* Some more commits

* Fix sample projects in extra/

* Remove preferredFrameSize test of ASEditableTextNode

* Remove preferredFrameSize from examples_extra

* Add deprecation warning to -[ASDisplayNode preferredFrameSize]

* Add deprecation warning to -[ASDisplayNode measureWithSizeRange:]

* Commit

* Commit

* Remove ASRelativeSizeRange

* Make ASRelativeSize private

* Adjust examples

* Improve setting of -[ASLayoutable size] with points or fractions

* Add ASWrapperLayoutSpec

* Improve creation of ASRelativeDimension

* Add `preferredFrameSize` back and add deprecated logging

* Add `layoutSpecBlock` setter and getter and add locking for it

* Add better documentation and fix macros to create ASRelativeDimension

* Create new ASSizeRangeMake with just a CGSize as parameter

* Update Kitten and Social App Layout example

* Add layoutThatFits: and deprecate measure:

* Rename ASRelativeDimension to ASDimension

* Fix examples for ASDimension renaming

* Remove fancy height and width setter

* Fix ASDimension helper

* Rename -[ASLayout layoutableObject] to -[ASLayout layoutable]

* Update layout related methods and more clearer documentation around how to use it

* Deprecate old ASLayout class constructors

* Don't unnecessary recalculate layout if constrained or parent size did not change

* Use shared pointer for ASDisplayNodeLayout

* Fix rebase conflicts

* Add documentation and move implementation in mm file of ASDisplayNodeLayout

* Fix test errors

* Rename ASSize to ASLayoutableSize

* Address comments

* Rename setSizeFromCGSize to setSizeWithCGSize

* Improve inline functions in ASDimension

* Fix rebase conflicts
2016-09-07 08:44:48 -07:00
Adlai Holler
eb9f86cfdb Replace "percent" with "fraction" where appropriate 2016-08-10 10:26:21 -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
Levi McCallum
ca2fb0bc74 Update FBSnapshotTestCase and generate @3x images 2016-06-08 13:33:03 -07:00
Michael Schneider
96df35e41a Initial commit for ASEnvironment 2016-03-31 20:43:20 -07:00
Eric Jensen
12da9ac6a9 Improve Swift compatibility of ASHorizontalAlignment & ASVerticalAlignment by using consistent naming 2016-03-21 11:16:28 -07:00
appleguy
d132416d90 Merge pull request #848 from nguyenhuy/JustifyContentSpaceBetweenAndAround
Implement "space between" and "space around" justify content options for stack layout
2015-11-29 21:46:42 -08:00
Huy Nguyen
0077c3eec6 Implement horizontal and vertical alignments for stack layout 2015-11-24 20:57:19 +02:00
Huy Nguyen
1162e02b06 Implement "space between" and "space around" options of stack layout justify content 2015-11-16 19:34:08 +02:00
rcancro
b14e189bfb Addressed comments to LayoutOptions PR 2015-09-11 16:07:18 -07:00
rcancro
cbaf178950 Hide ASLayoutOptions from the user 2015-09-08 09:50:47 -07:00
rcancro
15b3fd6eab Moved ASLayoutable* properties into ASLayoutOptions class 2015-09-08 09:50:27 -07:00
rcancro
680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00
Huy Nguyen
2149d44990 Fix naming convetion:
- "Layout node" is changed to "layout spec".
- Update tests.
- Update Kittens sample.
2015-07-01 18:13:44 +07:00