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

Grid not rendering until browser refresh or page resize. #90

Closed
AlexArchive opened this issue May 26, 2014 · 2 comments
Closed

Grid not rendering until browser refresh or page resize. #90

AlexArchive opened this issue May 26, 2014 · 2 comments

Comments

@AlexArchive
Copy link

When using this website (source) I have an issue. The grid does not render properly until I either refresh the browser (after the initial refresh everything is fine) or resize the browser.

The issue is described in more detail (with screenshots) here.

@kombai
Copy link
Owner

kombai commented May 27, 2014

Hello,
Please using this code for setup freewall instead of your code:

function makeWall(allhtml) {
    $("#grid").append(allhtml);

    var wall = new freewall("#grid");
    wall.reset({
      selector: '.brick',
      animate: true,
      cellW: 160,
      cellH: 'auto',
      onResize: function() {
        wall.fitWidth();
      }
    });
   wall.container.find('.brick img').load(function() {
    wall.fitWidth();
  });
  }

You must call Freewall when images loaded.
Best

@AlexArchive
Copy link
Author

Thanks man.

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