Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-wall-width=0 at specific window with sizes #228

Open
js-ffx opened this issue Jun 29, 2016 · 1 comment
Open

data-wall-width=0 at specific window with sizes #228

js-ffx opened this issue Jun 29, 2016 · 1 comment

Comments

@js-ffx
Copy link

js-ffx commented Jun 29, 2016

i have the problem that the wall does not show images/blocks at specific window sizes.
The container has a data-wall-width=0

my setup:

let freewall = require('freewall')
      this.wall = new freewall.Freewall('#editors-choice-images')


      this.wall.reset({
        selector: '.lightbox-delegator:not(.hidden)',
        animate: true,
        gutterY: 5,
        gutterX: 5,
        cellW: 300,
        cellH: 200,
        fixSize: 0,
        onResize: () => {
          that.wall.fitWidth()
          // that.resizeImgs()
        }
      })
      this.wall.fitWidth()

I could fix this problem when i change the following line in the freewall.js lib (line 111 https://github.com/tearsofphoenix/freewall/blob/master/freewall.js):
var col = !width ? 0 : Math[makeRound]((width + gutterX) / cellW);
to
var col = !width ? 0 : 1

at specific window sizes the col value becomes zero. Does anyone know what is the problem here, is something wrong with my config?

@MastaBaba
Copy link

For me when the cellW I set in wall.reset is larger than the available space for the cells, the cells disappear.

StefanoVollono added a commit to StefanoVollono/freewall that referenced this issue May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants