ashfurrow / ARCollectionViewMasonryLayout

MIT License
185 stars 16 forks source link

Move entries that stick out too far on the wrong side to the front #23

Closed alloy closed 9 years ago

alloy commented 9 years ago

This is a fix for https://github.com/artsy/eigen/issues/301

Currently the heuristic I chose is that an item may not stick out more than 50% of its own height compared to the shortest section in front of it.

There are a few inset related differences when integrating into Eigen that I still need to fix. I think this means there are some tests missing in this repo around the insets, so I’ll get that done first.

alloy commented 9 years ago

Btw, this previously existing snapshot is a good example of how the behaviour is changed.

alloy commented 9 years ago

This should be good to merge now :+1:

ashfurrow commented 9 years ago

Cool – I'll take a final look-through.

ashfurrow commented 9 years ago

I've seen similar errors to the one on Travis when I update pod version numbers. I don't know if this is the best fix, but I just remove the development pod from the podfile, pod install, add it back in, and then pod install again.

orta commented 9 years ago

Yeah it needs a local pod update ( or to always call that in the CI? )

ashfurrow commented 9 years ago

Looks great. Big fan of the abstraction you used. Going to merge, then fix the Podfile on master.

ashfurrow commented 9 years ago

2.1.0 is pushed to trunk.

alloy commented 9 years ago

Ah yeah, that makes sense. I probably shouldn’t have bumped the version for you yet, sorries.

Glad you like it :) There was also room for an abstraction around the various metrics in horizontal vs vertical mode, but didn’t yet spent time on that. E.g. a Metric class that’s initialised with the direction and the various sizes/insets and then returns the right ones. That instance can then be shared between the layout and the grid.