[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
This commit is contained in:
Michael Schneider
2016-09-22 16:00:52 -07:00
committed by GitHub
parent a9857f9963
commit 75dca556e6
24 changed files with 418 additions and 533 deletions

View File

@@ -35,8 +35,8 @@ __attribute__((overloadable)) static inline ASDisplayNode *ASDisplayNodeWithBack
ASDisplayNode *node = [[ASDisplayNode alloc] init];
node.layerBacked = YES;
node.backgroundColor = backgroundColor;
node.width = ASDimensionMakeWithPoints(size.width);
node.height = ASDimensionMakeWithPoints(size.height);
node.style.width = ASDimensionMakeWithPoints(size.width);
node.style.height = ASDimensionMakeWithPoints(size.height);
return node;
}