diff --git a/HISTORY.rst b/HISTORY.rst index cf6e05ef4b..cae6f658c1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -145,6 +145,8 @@ - Fix an egde case on the document indexing where an empty node could be left behind. - Improve the speed of the document indexing. +- Move the matchHeight call from lazy loading to image loading. + Reduces the chance of wrongly sized cards. 3.0.3 (2018-08-17) ================== diff --git a/docs/releases/3.1.rst b/docs/releases/3.1.rst index 1f7828220c..57ef915336 100644 --- a/docs/releases/3.1.rst +++ b/docs/releases/3.1.rst @@ -361,6 +361,8 @@ classes beyond the provide line chart. - Fix an egde case on the document indexing where an empty node could be left behind. - Improve the speed of the document indexing. +- Move the matchHeight call from lazy loading to image loading. + Reduces the chance of wrongly sized cards. Removals -------- diff --git a/mayan/apps/appearance/static/appearance/js/mayan_image.js b/mayan/apps/appearance/static/appearance/js/mayan_image.js index d8db8a9290..43e0a6ed88 100644 --- a/mayan/apps/appearance/static/appearance/js/mayan_image.js +++ b/mayan/apps/appearance/static/appearance/js/mayan_image.js @@ -45,6 +45,8 @@ class MayanImage { $(this).fadeIn(300); $(this).siblings('.spinner-container').remove(); $(this).removeClass('lazy-load pull-left'); + clearTimeout(MayanImage.timer); + MayanImage.timer = setTimeout(MayanImage.timerFunction, 100); }); $('.lazy-load-carousel').on('load', function() { @@ -70,9 +72,6 @@ class MayanImage { this.element.attr('src', this.element.attr('data-url')); $.fn.matchHeight._maintainScroll = true; - - clearTimeout(MayanImage.timer); - MayanImage.timer = setTimeout(MayanImage.timerFunction, 100); }; }