akoenig / angular-deckgrid

A lightweight masonry-like grid for AngularJS.
http://akoenig.github.io/angular-deckgrid
MIT License
1.1k stars 191 forks source link

Different column widths in the same grid #74

Closed gyss closed 9 years ago

gyss commented 9 years ago

Hi, it'd be nice if deckgrid supported different column widths. You can check an example of what I mean here.

akoenig commented 9 years ago

I'm not sure if I understand right, but you're able to define the column width within your CSS.

gyss commented 9 years ago

Yes, but I explained it wrong. The idea is to have certain elements that can take more than one column. For example if we have two columns of 200px width, could I have an element of 400px that take up both columns?

gyss commented 9 years ago

This is the idea I was trying to explain: Masonry

Citrullin commented 9 years ago

That's not possible with Deckgrid. Deckgrid works a little bit different as Masonry. Masonry gets the elements (after they are rendered) and fix the spaces between this elements. Deckgrid get the data before it's rendered made the columns with the same width and insert the elements equally over all columns. Deckgrid is only the fix for old browser who doesn't support CSS 3 Columns. Example of CSS 3 Columns: http://cssdeck.com/labs/css-only-pinterest-style-columns-layout

If you need this use Mansonry with a Angular Wrapper around it. It's the best solution for your problem :)

gyss commented 9 years ago

Okay!

thanks Citrullin