Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Small update to explicit constraint syntax docs + fixed some links
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Apr 12, 2016
1 parent 8447075 commit 678cad3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ var constraints = AutoLayout.VisualFormat.parse(evfl, {extended: true});
- [Operators](#operators) (`|-[view1(==view2/2-10)]-[view2]-|`)
- [Attributes](#attributes) (`V:|[view2(view1.width)]`)
- [Z-ordering](#z-ordering) (`Z:|-[view1][view2]`)
- [Equal size spacers/centering](#equal-size-spacers-centering)(`|~[center(100)]~|`)
- [Equal size spacers/centering](#equal-size-spacers--centering)(`|~[center(100)]~|`)
- [View stacks](#view-stacks) (`V:|[column:[header(50)][content][footer(50)]]|`)
- [View ranges (spread operator)](#view-ranges-spread-operator) (`H:[view1..8(10)]|`)
- [Multiple views](#multiple-views) (`Z:|[background][text1,text2,text3]|`)
- [Multiple orientations](#multiple-orientations-fill-content) (`HV:|[background]|`)
- [Disconnections (right/bottom alignment)](#disconnections-right-bottom-alignment) (`|[view1(200)]->[view2(100)]|`)
- [Disconnections (right/bottom alignment)](#disconnections-rightbottom-alignment) (`|[view1(200)]->[view2(100)]|`)
- [Negative values (overlapping views)](#negative-values-overlapping-views) (`|[view1]-(-10)-[view2]|`)
- [Explicit constraint syntax](#explicit-constraint-syntax) (`C:view1.centerX(view2.centerX)`)
- [Comments](#comments) (`[view1(view1.height/3)] // enfore aspect ratio 1/3`)
Expand Down Expand Up @@ -309,12 +309,13 @@ Numbers and percentages can also be negative, which can be useful for overlappin

### Explicit constraint syntax

EVFL also supports the ability to define constraints explicitly. This can be particular useful
Constraints can also be expressed explicitly. This can be particular useful
when it is otherwise not possible to express a layout or rule:

C:view1.centerX(view2.centerX) // view1 is horizontally centered to view2
C:view1.centerY(view2) // view1 is vertically centered to view2 (centerY is derived for view2)
C:view1.centerX(view2).bottom(view2.bottom) // view1 is horizontally centered and bottom aligned toview2 (chaining syntax)
C:view1.centerX(view2.centerX) // view1 is horizontally centered to view2
C:view1.centerX(view2) // attribute is inferred when omitted (centerX)
C:view1.centerX(view2).bottom(view2.bottom) // chaining syntax
C:view1.height(view2.width*2+10) // expressions

### Comments

Expand Down

0 comments on commit 678cad3

Please sign in to comment.