packery | : bento : Gapless , draggable grid layouts | Grid library
kandi X-RAY | packery Summary
kandi X-RAY | packery Summary
See packery.metafizzy.co for complete docs and demos.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Bundle plugin methods
- Get object size
- Creates a new Elasticlayer .
- Sets up the box size
- call method on plugin methods
- Get the size of all measurements
- Construct a new Item object .
- creates the random item and adds it to the DOM
- get milliseconds in ms
- call plugin method
packery Key Features
packery Examples and Code Snippets
var packery = new Packery(this.grid.nativeElement, {
itemSelector: '.grid-item', columnWidth: 100 });
"scripts": [
"../node_modules/packery/dist/packery.pkgd.js"
]
"
Community Discussions
Trending Discussions on packery
QUESTION
Why do the grid items in Isotope when using Packery vertically overlap each other?
Is it because they are dynamic in size? I.e., each Twitter feed item can be a different size after loading?
Or is there something wrong with the way I call imagesLoaded
or Packery?
I can't get a code snippet to work here on SO, so here is a fiddle https://jsfiddle.net/e9bdjf3z/1/
jQuery
...ANSWER
Answered 2021-Dec-27 at 15:26Well, imagesLoaded
works with images, while your code loads twitter cards.
A workaround for this would be to use the twitter API
QUESTION
I have been working on several things related to this for hours now. I finally got it to work, but somehow it broke again. So here I am.
For my use-case I want to display images with Packery. The images have to sort themselves so that the grid has no gaps. The user will be able to choose the sizing of the images inside the grid, and the grid should sort accordingly.
With every method that I've tried, they display over the rest of the page, or stack on top of each other.
I tested this with Masonry, Packery and Isotope. All give the same results. My code sample below is of the Packery attempt.
Edit: After more testing, I figured out that this issue only occurs when combining height and width classes. When only one of those is present, no overlapping occurs. I do need this functionality though.
The blue line shows where the images should end.
...ANSWER
Answered 2021-Feb-01 at 07:25After experimenting for a few more hours, I figured out that it is not possible to combine width and height classes that both use percentages. I now use percentages for width only. Height now uses fixed px values.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install packery
packery.pkgd.min.js minified
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page