sketch-hq / bccollectionview Goto Github PK
View Code? Open in Web Editor NEWA more versatile, faster and lighter replacement for NSCollectionView
A more versatile, faster and lighter replacement for NSCollectionView
Should be collectionViewDidZoom
This is a zoomed in example of what I'm talking about:
This commit in my branch fixes this issue by rounding the NSPoint
returned by convertPoint:fromView:
.
I'm trying to implement BCCollectionView in my app and am noticing some strange drawing behavior. It feels like when I'm resizing the content and there is extra room it's not filling the scroll view area with the background color and thus the scroll view background color is being drawn instead (blue in the case of my demo):
http://media.clickablebliss.com/blog/movies/scrollview_inner_view_resizing.mov
Also curious that the scroll view inner content resizes over time.
When I added a scroll view to the example project on aaronbrethorst's fork everything seemed ok.
Been trying to figure this out but am coming up empty. Any ideas?
One other issue I had is how you can sometimes find a sweet spot where the content size causes the scrollbars to appear and the content grid to resize, which causes the scroll bars to disappear, which causes the grid to resize, ad infinitum. Fun times. :)
http://media.clickablebliss.com/blog/movies/dancing_cells.mov
I want to display SVG image file on BCCollectionView how i do that?
No idea if this code is still being maintained, but its broken on Mountain Lion. The views aren't added until the scroll comes to an end.
Using BCCollectionView in my app I'm noticing that when I select a few items and hit delete, sometimes the drawing isn't right.
http://media.clickablebliss.com/blog/movies/delete_selection_bug.mov
When the managed object context changes I end up calling
[self.businessCollectionView reloadDataWithItems:self.businesses emptyCaches:NO];
If I change this to YES it works fine, though flickers a little.
I get the sense that with emptyCaches:NO you are trying to be good and only redraw the dirty rect but I wonder if you are fully taking into account everything that becomes dirty as cells move around. I dunno. :(
In the following method which locates at BCCollectionView.m, there are two return statements in the same method without any corresponding "if" statement. How does this happen? Is this a bug or some kind of special syntax ?
`- (NSIndexSet *) indexesOfItemContentRectsInRect: (NSRect)aRect
{
NSArray *itemLayouts = [layoutManager itemLayouts];
NSIndexSet *visibleIndexes = [itemLayouts indexesOfObjectsWithOptions: NSEnumerationConcurrent passingTest: ^BOOL(id itemLayout, NSUInteger idx, BOOL *stop){ return NSIntersectsRect([itemLayout itemRect], aRect); }];
return visibleIndexes;
NSUInteger firstIndex = [layoutManager indexOfItemContentRectAtPoint:NSMakePoint(NSMinX(aRect), NSMinY(aRect))];
NSUInteger lastIndex = [layoutManager indexOfItemContentRectAtPoint:NSMakePoint(NSMaxX(aRect), NSMaxY(aRect))];
if (firstIndex == NSNotFound)
firstIndex = 0;
if (lastIndex == NSNotFound)
lastIndex = [contentArray count]-1;
NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet];
for (NSUInteger i=firstIndex; i<lastIndex+1; i++) {
if (NSIntersectsRect(aRect, [layoutManager contentRectOfItemAtIndex:i]))
[indexes addIndex:i];
}
return indexes;
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.