Skip to content

Commit

Permalink
Add missing </div> tags in Layout API Sizing docs (TextureGroup#691)
Browse files Browse the repository at this point in the history
This fixes the broken documentation here: http://texturegroup.org/docs/layout2-api-sizing.html
  • Loading branch information
richardhenry authored and bernieperez committed Apr 25, 2018
1 parent 0d6fbfc commit ba79782
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/_docs/layout2-api-sizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The easiest way to understand the compound dimension types in the Layout API is
<img src="/static/images/layout2-api-sizing.png">

## Values (`CGFloat`, `ASDimension`)
<br>

`ASDimension` is essentially a **normal CGFloat with support for representing either a point value, a relative percentage value, or an auto value**.

This unit allows the same API to take in both fixed values, as well as relative ones.
Expand Down Expand Up @@ -41,6 +41,8 @@ ASDimensionMake("70pt")
ASDimensionMake(70)
ASDimensionMakeWithPoints(70)
</pre>
</div>
</div>

### Example using `ASDimension`

Expand Down Expand Up @@ -68,8 +70,10 @@ self.rightStack.style.flexBasis = ASDimensionMake(@"60%");
self.leftStack.style.flexBasis = ASDimensionMake("40%")
self.rightStack.style.flexBasis = ASDimensionMake("60%")

horizontalStack.children = [self.leftStack, self.rightStack]]
horizontalStack.children = [self.leftStack, self.rightStack]
</pre>
</div>
</div>

## Sizes (`CGSize`, `ASLayoutSize`)

Expand Down Expand Up @@ -187,5 +191,4 @@ func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec
</div>
</div>

<br>
The `constrainedSize` passed to an `ASDisplayNode` subclass' `layoutSpecThatFits:` method is the minimum and maximum sizes that the node should fit in. The minimum and maximum `CGSize`s contained in `constrainedSize` can be used to size the node's layout elements.

0 comments on commit ba79782

Please sign in to comment.