Skip to content
This repository has been archived by the owner on Dec 30, 2018. It is now read-only.

Masonry directive as an element doesn't create columns #169

Open
vrockai opened this issue Mar 18, 2016 · 2 comments · May be fixed by #191
Open

Masonry directive as an element doesn't create columns #169

vrockai opened this issue Mar 18, 2016 · 2 comments · May be fixed by #191

Comments

@vrockai
Copy link

vrockai commented Mar 18, 2016

In the README.md, the masonry directive is used as an element. It doesn't work properly (creates only a single column) for me when I use it as E directive like:

<masonry>
    ...
</masonry>

but it works well when used as A directive like:

<div masonry>
    ...
</div>
@vrockai vrockai changed the title Masonry directive as an element has doesn't create columns Masonry directive as an element doesn't create columns Mar 22, 2016
@elstanto
Copy link

elstanto commented Apr 6, 2016

This also happened to me, using bower install.

@jodytate
Copy link
Contributor

jodytate commented Apr 9, 2016

I can reproduce this with the demo. The documentation does seem to be at odds. It says:

You have to include the masonry attribute on the element holding the bricks.

But then the examples that follow use masonry as an element.

Seems like a pull request could:

  • fix the docs
  • change restrict: AE to restrict: A

@passy Unless there's a bug disallowing use of masonry as an element, I could submit some changes.

blakerego added a commit to blakerego/angular-masonry that referenced this issue Mar 12, 2017
The masonry directive does not properly create columns when used as an element.  To avoid confusion,
I updated the directive code to restrict usage to attribute mode only (this could always be changed
back, if a subsequent fix was made to fix element loading). I have also updated the repository
README documentation to provide a more accurate account of how the masonry directive currently
works. This issue was first brought up here: passy#169.

This will invalidate uses of this directive as an element. However, these uses are likely already
broken.
blakerego added a commit to blakerego/angular-masonry that referenced this issue Mar 12, 2017
The masonry directive does not properly create columns when used as an element.  To avoid confusion,
I updated the directive code to restrict usage to attribute mode only (this could always be changed
back, if a subsequent fix was made to fix element loading). I have also updated the repository
README documentation to provide a more accurate account of how the masonry directive currently
works. This issue was first brought up here: passy#169

This will invalidate uses of this directive as an element. However, these uses are likely already
blakerego added a commit to blakerego/angular-masonry that referenced this issue Mar 14, 2017
The masonry directive does not properly create columns when used as an element. To avoid confusion,
I updated the directive code to restrict usage to attribute mode only (this could always be changed
back, if a subsequent fix was made to fix element loading). I have also updated the repository
README documentation to provide a more accurate account of how the masonry directive currently
works. This issue was first brought up here: passy#169. Also updated the tests to reflect this change.

BREAKING CHANGE: This will break uses of this directive as an element. However, these uses are
likely already broken. closes passy#169
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants