Giter Site home page Giter Site logo

How to use reloadItems about packery HOT 6 CLOSED

 avatar commented on May 28, 2024
How to use reloadItems

from packery.

Comments (6)

desandro avatar desandro commented on May 28, 2024

reloadItems is useful if you want to re-collect all the item elements in the container element, like after prepending a lot of items, or messing with their order in the DOM.

With your example, you most likely just need to use layout. With jQuery, this is just the same as $container.packery(). See http://jsfiddle.net/Bp3Gr/2/

Thanks for providing an example!

from packery.

 avatar commented on May 28, 2024

Perfect thank you. That clarifies the difference between the two.

Thanks!

from packery.

 avatar commented on May 28, 2024

Hi David, just another question about this.

So my intention is that on one item there is an accordion function that makes the height of an item a bit taller, causing the items to collapse on top of each other.

Is using the layout method every time the accordion is used the best way to prevent items from collapsing?

from packery.

desandro avatar desandro commented on May 28, 2024

Is using the layout method every time the accordion is used the best way to prevent items from collapsing?

Yes. You should trigger layout once all items have their proper size set. In your case, you would want to trigger layout after the accordion animation has completed.

from packery.

BenRacicot avatar BenRacicot commented on May 28, 2024

Hello, I opened an issue about this as well and was hoping to get a solution to re-layout my items to their original state. After they've been layout() several times my blocks are in a strange unwanted order. Any advice would be great!

from packery.

prajapati-gautam avatar prajapati-gautam commented on May 28, 2024

@desandro
I have an issue with dragged items blanks fill with another element and I want to stop that.
there is any way to stop that.

like not using auto layout
just place every element where it was. and do not update until any action on it.
I tried with stamp element when loading and then unstamp after setting on position.
@desandro you are doing awesome on that can you help me out with this problem.
thank for the awesome plugin.

from packery.

Related Issues (20)

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.