GithubHelp home page GithubHelp logo

chris-l / bin-packing-grid Goto Github PK

View Code? Open in Web Editor NEW
121.0 121.0 9.0 1007 KB

Web component that fit elements into a grid using bin-packing, in a masonry-like way. Similar to what pinterest and other sites have

Home Page: http://chris-l.github.io/bin-packing-grid/

JavaScript 50.91% HTML 49.09%

bin-packing-grid's People

Contributors

chris-l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bin-packing-grid's Issues

Chris Please look!!

I need to implement this in A4 size grid, is it possible? so that when i print i got my paper full of images

Issue with using bin-packing-grid in polymer templates

Hi, thanks for your awesome work.

I'm writing a meteor application with polymer templates (using synthesis).

When using your element in the main.html (directly in the body tag), it works like a charm. However, when I use it in a nested dom-module and include that dom-module in my main.html, it does not. I have already made sure that the bin-packing-grid item has the correct size (not 0x0).

Any input on this? Let me know if I can provide you with further data. I don't have a public meteor host, otherwise I would share a sample. If you can't reproduce it, I'll zip you something.

Crashes in Safari

It throws "TypeError: undefined is not a function (evaluating 'obj.createShadowRoot()') @bin-packing-grid.js:25"

Edit: works with webcomponents.js not with webcomponents-lite.js

Clarify how the element works internally in README

“It will try to fit everything and leave no spaces, but in case there are gaps left, it will create div elements to fill them.”

How does this work? Are the items’ dimensions changed in the process. How? CSS scale() transforms?

Drag and Drop Suggestion

Great demo, very cool.

I was just thinking that it would be interesting to do a drag and drop feature. Where you grab one block and can decide where to place it. The others would flip away to make space, and then find their own space when you dropped the block.

Automatic number of rows?

I'm searching for a masonry-like web component now, and a lot of them are Polymer 0.x based... yours doesn't depend on Polymer, which works fine in a 1.0 app.

Unfortunately, seems like it requires rows="N" on all of the elements which makes it kinda pointless. I need to display news articles in a bin-packed grid – I don't know the heights of the elements!

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.