Open paramsinghvc opened 9 years ago
I am experiencing this issue without using infinite scroll. Steps to consistently reproduce:
Regular 3G
to simulate slow image loading<div masonry="{ percentPosition: true, columnWidth: '.masonry-sizer', itemSelector: '.masonry-brick' }">
<div class="masonry-sizer"></div>
<div class="masonry-brick" ng-repeat="card in posts track by $index">
</div>
For anyone looking for a temporary solution: I solved it by disabling the in-built imagesLoaded functionality (setting attribute load-images="false"
on the masonry element) and implementing image loading logic with imagesLoaded in a separate directive, calling $scope.$broadcast("masonry.reload")
on image load.
I fixed it by setting the image size explicitly.
In my controller I grab the width of the masonry grid-sizer:
vm.imageWidth = angular.element(".masonry-grid-sizer")[0].clientWidth;
And in my view I calculate the height based on the original image dimensions:
height="{{(view.imageWidth / record.asset[0].width) * record.asset[0].height}}"
Same issue here no fix made until now ?
I faced the same issue and applied min height to the div after images are loaded ,bricks are reloaded.
I'm using this directive to generate the list of products with images but the images are loaded very badly slowly and overlapping on each other in the beginning. Apparently, the imagesLoaded plugin isn't working at all. Here's my code :
Please Help! Urgent!!