4

Fuseki.net's rect this is implemented in python (more tests)

I'm interested in a result like in the image above (implemented in python) using the Packery.js jQuery plugin for js/DOM based bin packing. Packery is built to work from left to right, top to bottom, but I wonder if using a circular bounding box rather the viewport as its boundaries could do the trick.

Ultimately I want to use this to present many image thumbnails with a wide array of sizes and proportions.

Any code examples or other pointers would be highly appreciated.

Here's a CodePen for you to play with:

Glorfindel
  • 19,729
  • 13
  • 67
  • 91
Mushon
  • 81
  • 8
  • Please edit the externally hosted code into the post; doing so will make sure it remains useful even if the link breaks. My script [is not allowed to do this](https://meta.stackoverflow.com/a/344512/4751173) because of potential licensing problems. – Glorfindel Sep 11 '19 at 13:23

1 Answers1

10

Yes! See https://github.com/metafizzy/packery/issues/62

In the works.

Packery center out

Development is on the center-out-corner branch. It's in an experimental phase. While this is a neat visual demo, I'm unsure how practical its application is.

desandro
  • 2,836
  • 1
  • 20
  • 29
  • thanks @desandro (for this and for Packery and all the other wonderful work you do). It sure looks great! We will check out the code and see if it's what we're looking for. Thanks again. You're awesome! – Mushon Jan 31 '14 at 10:20
  • ok, we played with the code a bit and it looks promising. However it still quite buggy with elements occasionally overlapping and others simply not aligning to the pack. Are you familiar with these bugs or would you want me to post them as issues on GH? – Mushon Feb 06 '14 at 12:30
  • Yes, I consistently see the same two problems; a) overlapping items, and b) one or more items (generally the largest), getting stuck in place and not repacking when the window changes size. Any thoughts on these (...hoping to award the bounty soon)? – rednoyz Feb 07 '14 at 09:42