Commit Graph

3530 Commits

Author SHA1 Message Date
appleguy
243873dc1f Merge pull request #723 from nguyenhuy/LayoutSubnodesUsingBoundsAndPosition
Use bounds and position to layout subnodes
2015-10-07 12:12:43 -07:00
Huy Nguyen
5a2fea7c1d Use bounds and position to layout subnodes, instead of frame because it is not safe in case the transform property constains a non-identity transform. 2015-10-07 21:54:48 +03:00
Huy Nguyen
f13f61c2f0 Add relayout item/row APIs to ASTableView and ASCollectionView. 2015-10-07 21:25:07 +03:00
Adlai Holler
cb407367be Cancel image requests in ASMultiplexImageNode.clearFetchedData 2015-10-07 10:08:54 -07:00
Adlai Holler
cdfd5c1fdd Check whether data source responds to asset method 2015-10-07 10:08:28 -07:00
appleguy
697142240c Merge pull request #719 from rcancro/baselineFixes
Fixes to baseline stack alignment
2015-10-06 22:27:38 -07:00
ricky cancro
89a216b90d Fixes to baseline stack alignment
1) Set the ascender/descender of an ASTextNode when the attributeString is set. Previously ascender/descender were only being computed in `setValuesFromLayoutable` and only when the attribute string was not nil. May make sense to remove the computation from `setValuesFromLayoutable` entirely.
2) Remove ability to allow different children of a stack spec to aling to different baselines. This wasn't working before and I'm not convinced it is possible to do properly/useful enough to invest the time.
3) Have all stack spec run `ASStackBaselinePositionedLayout::compute` to compute the stack's ascender and descender. Even if the stack isn't aligning its children to a baseline, the stack itself may be a child of another stack that IS aligning to a baseline.
2015-10-06 21:41:39 -07:00
Adlai Holler
6d73cee9fd Give ASMultiplexImageNodeDataSources an opportunity to provide PHAssets quicker 2015-10-06 16:35:50 -07:00
appleguy
e41f7c59c4 Merge pull request #717 from levi/scrollnode-initializer
Use long-form view block initializer for better Swift support
2015-10-06 15:26:31 -07:00
appleguy
ed7f2274f9 Merge pull request #711 from garrettmoon/addSupportForDisablingAndEnablingShouldRasterize
Adds support for disabling and re-enabling should rasterize.
2015-10-06 13:36:54 -07:00
appleguy
656fbeb526 Merge pull request #706 from facebook/NilDelegate
Properly support operating with nil asyncDelegate for Table & Collection.
2015-10-06 13:35:23 -07:00
Adlai Holler
fffc76a353 Have ASMultiplexImageNode store its image request operation weakly 2015-10-06 13:21:42 -07:00
Garrett Moon
1a8f66919b Add tests for enabling / disabling shouldRasterize 2015-10-06 11:47:13 -07:00
Garrett Moon
8a70c8d416 Adds support for disabling and re-enabling should rasterize. 2015-10-06 11:47:13 -07:00
appleguy
f91e008b23 Merge pull request #715 from Adlai-Holler/DeeperCompares
Expand usage of ASObjectIsEqual to clean up / encourage fast-path compares.
2015-10-06 11:31:44 -07:00
Levi McCallum
1f799a6687 Use long-form view block initializer for better Swift support 2015-10-06 09:34:57 -07:00
Adlai Holler
1801620094 Make ASTextNode copy exclusionPaths and attributedString 2015-10-06 00:46:20 -07:00
Adlai Holler
ae3eb70f6a Public API fast paths in ASTextNode 2015-10-06 00:40:33 -07:00
Adlai Holler
87caed27e2 Add more deep compares when setting public properties to the same value 2015-10-05 23:48:48 -07:00
Adlai Holler
f0b7e150cd Limit 1 inflight Photos.framework request per multiplex image node 2015-10-05 23:40:33 -07:00
Adlai Holler
d94dcdef0f Only do PHAsset metadata requests one at a time to workaround Photos framework deadlock 2015-10-05 23:40:33 -07:00
appleguy
2e5da5599d Merge pull request #713 from Adlai-Holler/MultiplexImageNodeShortCircuit
Use deep compare when setting image identifiers in ASMultiplexImageNode
2015-10-05 22:52:01 -07:00
Adlai Holler
ce97b56580 Sugar 2015-10-05 20:41:21 -07:00
Adlai Holler
c5b5bdd29c Use deep compare when setting image identifiers in ASMultiplexImageNode 2015-10-05 20:34:42 -07:00
appleguy
00e993c07b Merge pull request #710 from garrettmoon/fixShouldRasterizeSubnodes
Fix shouldRasterizeSubnodes skipping setting offset and clipping.
2015-10-05 18:04:54 -07:00
Garrett Moon
b1d03f1d58 Address comments 2015-10-05 16:02:01 -07:00
Garrett Moon
d6c107a896 Fix shouldRasterizeSubnodes skipping setting offset and clipping. 2015-10-05 16:02:01 -07:00
Adlai Holler
ee970d412b Annotate ASCollectionViewProtocols.h 2015-10-05 13:48:09 -07:00
Adlai Holler
8bb9d173dc Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
	AsyncDisplayKit/ASMultiplexImageNode.h
	AsyncDisplayKit/ASViewController.h
	AsyncDisplayKit/Details/ASDataController.h
2015-10-05 13:24:16 -07:00
appleguy
2f1d57e50c Merge pull request #708 from Adlai-Holler/FasterLayoutNodes
Faster handling of iteration to lay out nodes in ASDataController.
2015-10-05 12:46:37 -07:00
Adlai Holler
99b9f73b1a Fix index into size ranges 2015-10-05 11:51:05 -07:00
Adlai Holler
33c07db58c Set node.frame entirely 2015-10-05 11:42:25 -07:00
Adlai Holler
4601fccb5a Optimize ASDataController._layoutNodes 2015-10-05 11:37:29 -07:00
Scott Goodson
77745c55b0 Properly support operating with nil asyncDelegate for Table & Collection. 2015-10-04 17:11:41 -07:00
appleguy
67cf6d3951 Merge pull request #705 from facebook/ThreadAffinity
Improved messages for thread affinity and frame transform identity assertions.
2015-10-04 16:24:39 -07:00
Scott Goodson
61bb4f022e Improved messages for thread affinity and frame transform identity assertions. 2015-10-04 11:15:57 -07:00
appleguy
057422d52b Merge pull request #699 from rcancro/staticLayout
Fix static layout to ensure it always considers its sub layout's preferred sizes.
2015-10-04 10:52:02 -07:00
appleguy
ca2399f57f Merge pull request #704 from marmelroy/feature-dynamic-framework-test
Fixing dynamic framework target and adding an example for Travis
2015-10-04 09:12:53 -07:00
Roy Marmelstein
c92a15515d Adding readme 2015-10-04 11:07:47 +02:00
Roy Marmelstein
f4ba447159 Updating Travis and Build script to test dynamic framework building 2015-10-04 11:03:52 +02:00
Roy Marmelstein
caf306123c Removed unnecessary bridging header 2015-10-04 11:00:03 +02:00
Roy Marmelstein
4380e0baae Framework test target 2015-10-04 10:58:33 +02:00
appleguy
6f9c819b5d Merge pull request #701 from rcancro/layoutOptionBug
wasn't copying alignSelf
2015-10-02 23:14:01 -07:00
ricky cancro
eb5e670e5d wasn't copying alignSelf 2015-10-02 20:58:52 -07:00
appleguy
897f7210ad Merge pull request #687 from Adlai-Holler/AdvancedPhotos
Advanced Photos Integration
2015-10-02 16:40:58 -07:00
ricky cancro
45a555cdb5 Static layout bug?
I noticed when creating a static layout that the sizeRange of the children was being ignored. The case was:

I had an image as a child of a static layout
The image was set to have an exact range of 90x90
When the static layout was measured, the constrained size came in as 375xInf (the width of the containing node and unbounded)
The static layout computed its final size as 375x90

According to the comments in component kit's header file the static layout  "[c]omputes a size that is the union of all childrens' frames." It appeared that we are only doing that in the unbounded direction. My fix is to do it in both directions.
2015-10-02 15:56:31 -07:00
Adlai Holler
304ec9b543 Refuse to parse ph:// URLs if iOS < 8 for safety 2015-10-02 15:51:32 -07:00
Adlai Holler
d5a6ad2123 Avoid accessing PHImageManager in ASMultiplexImageNode init 2015-10-02 15:41:01 -07:00
appleguy
6d369ff815 Merge pull request #697 from garrettmoon/fixCornerRadius
Corner radius and clipsToBounds should be captured outside block
2015-10-02 15:00:14 -07:00
Adlai Holler
ac8b224d9b Fix broken ASPhotosFrameworkImageRequest test 2015-10-02 13:04:48 -07:00