Giter Club home page Giter Club logo

Comments (5)

desandro avatar desandro commented on June 27, 2024

Thanks for the report! Could you provide a reduced test case for either issue? See Submitting Issues in the contributing guidelines.

from packery.

abhishiv avatar abhishiv commented on June 27, 2024

I might have a test case, the issue doesn't happen in isolation but in certain circumstances. http://rma-dash.herokuapp.com/

    @pckry = $container.packery({
      itemSelector: '.item',
      gutter: 0
      transitionDuration: "0.9s"
    }).data('packery')
    window.pckry = @pckry
    itemElems = @pckry.getItemElements();
    _(itemElems).each (elem) =>
      draggie = new Draggabilly( elem );

This is applied in a timeout so that the bug is more visible.

from packery.

abhishiv avatar abhishiv commented on June 27, 2024

Ok, just realized that if you are setting item heights as %, the change of container's height(maxY) would break the layout.

For me commenting out this.element.style.height = elemH + 'px'; seems to fix the layout, but I am sure it would break some things.

@desandro what's the rational of setting container's height?

from packery.

didip avatar didip commented on June 27, 2024

OK, we fixed our bug on width issue, but it's cargo-cultish fix.

We fetch our payload using AJAX, so we figured we may have timing issue and that turns out to be correct.

If we instantiate Packery too soon, we get the width bug that create the N-1 problem.

If we instantiate Packery too late, we see transparent white space on top.

Maybe it's because we didn't set this.options.isInitLayout = false?

from packery.

desandro avatar desandro commented on June 27, 2024

Yes, so

  1. percentage height on items will not work, currently. If you had an option to disable Packery from setting height on a container, would this resolve your problem
  2. Container width is container width. The only problem I see is that Packery sets position: relative, which may affect the size of the container. You can changed this with containerStyle option

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.