angular-masonry icon indicating copy to clipboard operation
angular-masonry copied to clipboard

ImagesLoaded not working properly

Open chrillewoodz opened this issue 9 years ago • 4 comments

I'm using an external API to fetch movie images, when the request is done I bind it to the scope and then repeat the images in a ng-repeat for use with the masonry directive. Problem I'm having is that the images are not stacked upon each other on page load, but rather when I make a new request to fetch some other images from my navigation menu. Isn't imagesLoaded supposed to take care of this?

Is there a fix for this?

I managed to "fix" it by adding a timeout of 100ms but this is bound to fail for some users so I don't consider it as an actual solution. All the issues I've read is that people are having my problem but in reverse, so the images stack on page load but not after that.

Please help.

chrillewoodz avatar Aug 07 '15 10:08 chrillewoodz

Hi! I have the same problem.Where exactly did you add timeout?Which part of the code?Thanks.

ElenaP avatar Aug 28 '15 08:08 ElenaP

Same issue here. My image URL are retrieved from an internal API and then injected into the scope.

Shingaz avatar Oct 01 '15 19:10 Shingaz

Have the same problem also. Has anyone found a viable solution for this issue?

razvandk avatar Dec 07 '15 09:12 razvandk

@existence17 I found a solution (demo)

I used a custom version of this directive: https://github.com/bimal1331/angular-images-loaded#eventsalways-available

JohnnyTheTank avatar Dec 07 '15 09:12 JohnnyTheTank