Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: does it support multiple items per row? #5

Open
mdings opened this issue Jun 18, 2016 · 5 comments
Open

Question: does it support multiple items per row? #5

mdings opened this issue Jun 18, 2016 · 5 comments

Comments

@mdings
Copy link

mdings commented Jun 18, 2016

To create grid views, for example.

@paulpflug
Copy link
Member

The only thing currently possible is with a fixed amount of items per row.

I thought about implementing this with adaptive amount of items per row and if every item has the same width and height, this is easy, but I'm not sure if this is needed..

so what is your use case?

@mdings
Copy link
Author

mdings commented Jun 21, 2016

Basically I want to display a grid of images that are equal width and height. So that's the easy scenario I guess :). Can the plugin handle floats/flex or do I have to map the data array to a grid first? I noticed the original cluserize.js plugin doesn't handle floated items very well.

@paulpflug
Copy link
Member

I added functionality for multiple items
see
https://github.com/vue-comps/vue-clusterize#props (bottom)
and
https://github.com/vue-comps/vue-clusterize#flex

and demo:
https://vue-comps.github.io/vue-clusterize/#!/flex

please report any problems you encounter..

@mdings
Copy link
Author

mdings commented Jul 1, 2016

Seems like the demo is not working as smooth as it should be I guess. Sometimes upon resizing the following error is thrown (tested in Chrome): index_bundle.js:1 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined. Also it seems that some elements are overlapping when resizing (see image below)

clusterize

I also encountered the following error while running some local tests: Uncaught TypeError: Cannot read property 'nr' of undefined

@paulpflug
Copy link
Member

hey, thanks for testing.

  • index_bundle.js:1 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined comes when the window is so small that no items are rendered in the first row (fixed in 0.5.1)
  • the overlapping is a problem with different sizes of the items. This can be overcome by reducing the flex-fac prop (which increases the white-space so there is more room for different sizes). But this will get ugly fast..
  • Uncaught TypeError: Cannot read property 'nr' of undefined comes when there is not enough data to fill 3 clusters related: Uncaught TypeError: Cannot read property 'nr' of undefined #9 (fixed in 0.5.0)

please report back with any problems you encounter 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants