Code Monkey home page Code Monkey logo

Comments (5)

paulpflug avatar paulpflug commented on June 23, 2024

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?

from vue-clusterize.

mdings avatar mdings commented on June 23, 2024

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.

from vue-clusterize.

paulpflug avatar paulpflug commented on June 23, 2024

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..

from vue-clusterize.

mdings avatar mdings commented on June 23, 2024

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

from vue-clusterize.

paulpflug avatar paulpflug commented on June 23, 2024

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: #9 (fixed in 0.5.0)

please report back with any problems you encounter 👍

from vue-clusterize.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.