95 Commits

Author SHA1 Message Date
rcancro
f6d6768985 Fixed infinite recursion in finalLayoutable, removed child properties from ASLayoutSpecs 2015-08-28 20:11:19 -07:00
rcancro
e6a07ffe58 Kittens sample working 2015-08-28 15:55:41 -07:00
rcancro
9a702a49ad Hide ASLayoutOptions from the user 2015-08-28 14:30:50 -07:00
rcancro
afade854af Moved ASLayoutable* properties into ASLayoutOptions class 2015-08-28 09:36:22 -07:00
rcancro
9bf62d14ab Merge remote-tracking branch 'upstream/master' into baseline
# Conflicts:
#	AsyncDisplayKit/Layout/ASLayoutSpec.h
#	AsyncDisplayKit/Layout/ASStackLayoutSpec.mm
2015-08-24 09:54:36 -07:00
rcancro
1d31a21ccb Merge branch 'baseline' of github.com:rcancro/AsyncDisplayKit into baseline
# Conflicts:
#	AsyncDisplayKit.xcodeproj/project.pbxproj
#	AsyncDisplayKit/ASTextNode.h
#	AsyncDisplayKit/Details/ASDataController.mm
2015-08-22 19:14:59 -07:00
rcancro
e991242513 removed "Stack" from baseline related layout names 2015-08-22 19:03:55 -07:00
rcancro
49ac178166 huy's comments 2015-08-22 19:03:55 -07:00
ricky cancro
5d286930f6 Renamed ASStackText... to ASBaselineStack... 2015-08-22 19:03:54 -07:00
rcancro
830d39af92 fixed bug for baseline last 2015-08-22 19:03:54 -07:00
ricky cancro
2d6ddfe32e moved baseline alignment to a layout spec. 2015-08-22 19:03:54 -07:00
rcancro
9036ab8e7d new stack layout spec for text 2015-08-22 19:03:54 -07:00
ricky cancro
ef89f758bc flailing 2015-08-22 19:03:54 -07:00
ricky cancro
3fd241e87e fixed vertical spacing bug and typo 2015-08-22 19:03:54 -07:00
ricky cancro
cf428831a4 Added baseline spacing for vertical stack views. 2015-08-22 19:03:54 -07:00
ricky cancro
f289b3345a Add baseline support to ASStackLayoutSpec 2015-08-22 19:03:54 -07:00
rcancro
0ea276e3ab huy's comments 2015-08-22 18:47:16 -07:00
Huy Nguyen
f7f20ca8b7 preferredFrameSize should be used even if neither -layoutSpecThatFits: nor -calculateSizeThatFits: is overridden by subclassses. 2015-08-22 17:09:57 -07:00
Huy Nguyen
b93faab7f5 Improve relayout when constrained size of all nodes is changed:
- In -layoutSubviews of table and collection views, detect changes that cause a different constrained size for nodes, and trigger relayout immediately.
- Orientation change can be handled by this solution. So, no need to observe to its events.
- Update Kittens example to support iPad (easier to catch bugs on these devices) and add a title to navigation bar (looks a bit nicer).
2015-08-22 17:09:57 -07:00
rcancro
c06a6be188 ASLayoutSpec are temporarily mutable and have a more obj-c interface 2015-08-21 16:02:36 -07:00
ricky cancro
023ad89815 Renamed ASStackText... to ASBaselineStack... 2015-08-21 08:54:28 -07:00
rcancro
0a398301b0 fixed bug for baseline last 2015-08-20 20:43:18 -07:00
ricky cancro
f404231b35 moved baseline alignment to a layout spec. 2015-08-20 10:38:54 -07:00
rcancro
e7ffe67e3c new stack layout spec for text 2015-08-19 22:03:02 -07:00
ricky cancro
774d91653b flailing 2015-08-19 16:59:23 -07:00
appleguy
3983bf2289 Merge pull request #603 from nguyenhuy/improved_external_relayout
Improve relayout when constrained size of all nodes is changed
2015-08-15 22:07:50 -07:00
ricky cancro
11896904a2 fixed vertical spacing bug and typo 2015-08-15 09:45:14 -07:00
ricky cancro
d7564e18e5 Added baseline spacing for vertical stack views. 2015-08-15 08:17:43 -07:00
Huy Nguyen
1313c11519 preferredFrameSize should be used even if neither -layoutSpecThatFits: nor -calculateSizeThatFits: is overridden by subclassses. 2015-08-13 07:53:00 +03:00
Huy Nguyen
7249661990 Improve relayout when constrained size of all nodes is changed:
- In -layoutSubviews of table and collection views, detect changes that cause a different constrained size for nodes, and trigger relayout immediately.
- Orientation change can be handled by this solution. So, no need to observe to its events.
- Update Kittens example to support iPad (easier to catch bugs on these devices) and add a title to navigation bar (looks a bit nicer).
2015-08-13 06:28:47 +03:00
ricky cancro
afffd9cfb2 Add baseline support to ASStackLayoutSpec 2015-08-12 16:55:12 -07:00
appleguy
d401b0e5f6 Merge pull request #593 from shannonma/merge_fork
Fixes for ASTextNode test, setNeedsDisplay and font loading failures
2015-08-08 18:55:00 -07:00
Huy Nguyen
e657bedd40 Automatically relayout cells after orientation changed. 2015-08-09 00:36:58 +03:00
appleguy
f97af9cb26 Merge pull request #594 from nguyenhuy/relayout_same_constrained_size
Support internal relayout
2015-08-04 12:27:30 -07:00
Roy Marmelstein
26202865ac Adding files that were missing from the framework target 2015-08-04 00:07:30 +02:00
Huy Nguyen
56768a837a - Support internal relayout, that is a relayout caused by internal layout changes, like subnodes re-arrangement and/or subnodes' size change. The constrained size applied to root node is unchanged.
- Update Kittens example to show how internal relayout is done.
2015-08-02 17:18:45 +03:00
Shannon Ma
15133fdbf7 setNeedsDisplay must be called on main 2015-07-31 12:11:19 -07:00
Huy Nguyen
e1fd58268c Clean up #468:
- -layoutSpecThatFits: must return an ASLayoutSpec.
- Move ASDisplayNode's -measureWithSizeRange: redeclaration to ASDisplayNode.h.
- Rename ASStackLayoutChild.h to ASStackLayoutDefines.h.
- Rename ASStaticLayoutSpecDimension.h to ASRelativeSize.h.
- Don't import ASLayout.h in other headers to prevent circular inclusions.
- Explain use cases of ASLayout's initializers.
- Clean up ASInternalHelpers.h.
2015-07-10 19:41:17 +07:00
Huy Nguyen
51f1ed819f - ASDisplayNode now caches calculated layout requested by layout specs.
- constrainedSizeForCalculatedLayout is of type ASSizeRange.
- calculatedLayout is better explained.
- Since ASLayout is cached and reused, its position property is mutable.
2015-07-06 22:08:01 +07:00
Huy Nguyen
af64f33ed7 Minor changes: remove unncessary imports and add a new line ad the end of ASInternalHelpers.h 2015-07-01 18:36:36 +07:00
Huy Nguyen
2a3753516a Fix naming convention: Rename ASLayout's "children" to "sublayouts". 2015-07-01 18:13:54 +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
Huy Nguyen
4799a9d206 Remove ASLayoutChild. ASLayout now has a position property defaults to (NAN, NAN). 2015-06-30 19:42:38 +07:00
Huy Nguyen
dd29a890df Still support -calculateLayoutThatFits: (and manual layout), for backward compatibility. 2015-06-28 20:31:32 +07:00
Huy Nguyen
95e787b226 Remove stack children type:
- ASLayoutable requires mutable properties that are used when attached to a stack layout.
- Thus, ASLayoutable objects (including ASDisplayNode) can be injected into stack layout directly.
- ASStackLayoutNodeChild no longer needed.
- Tests and Kitten sample updated.
2015-06-26 11:47:42 +07:00
Huy Nguyen
f588bceb4d Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol.
- ASDisplayNode can be embeded directly into layout graph.
- Eliminate ASCompositeNode.
- Fix ASStaticSizeDisplayNode not recpect min constrained size.
- Updated tests.
2015-06-26 09:29:16 +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
810bc3ab84 Rename ASLayoutNode's -computeLayoutThatFits to -calculateLayoutThatFits. 2015-06-25 11:34:37 +07:00
Huy Nguyen
64e2323a4e Remove ASLayoutNodeSize:
- ASLayoutNode no longer has 'size' constraint during its initialization..
- ASLayoutNode no longer needs parentSize to calculate its layout.
2015-06-25 11:34:36 +07:00