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

Weird white space when not using ng-for #28

Open
C-4PO opened this issue Dec 24, 2016 · 3 comments
Open

Weird white space when not using ng-for #28

C-4PO opened this issue Dec 24, 2016 · 3 comments
Labels

Comments

@C-4PO
Copy link

C-4PO commented Dec 24, 2016

       <masonry [options]="myOptions" (layoutComplete)="doStuff($event)">
        <div class="panel-sizer"></div>
        <masonry-brick class="panel panel-width-20">
          heyeyeye
        </masonry-brick>
        <masonry-brick class="panel panel-width-20">
          heyeyeye
        </masonry-brick>
      </masonry>
 .panel-sizer{
  width: $size-unit;
}

.panel {
  margin-top:$buffer;
  height: 200px;
  background-color: #01ff70;
}

.panel-width-20 {
  width: calc(20% - #{$buffer});
}

When not using NG-for it gives me leading white space the size of the squares

screen shot 2016-12-24 at 2 05 27 pm

@jelgblad jelgblad added the bug label Dec 30, 2016
@craig2017
Copy link

I have this same issue. I just want to manually add bricks without looping over an array and there is a huge space at the top of the page.

I'm happy to contribute the fix. Any ideas on where I might look? It looks like the absolute heights are getting calculated incorrectly.

@peterfeddo
Copy link

This is not a permanent solution but a quick fix for @craig2017 could be to put ngIf on the masonry-brick elements and then have then display after the DOM is loaded. This technique resolved the issue for me until a better fix is provided to address the problem.

@rcfrias
Copy link

rcfrias commented Jul 28, 2017

same bug here, I cant believe the only way of using this is with masonry-brick with an *ngFor. Almost exited about finding this lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants