summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/js/build/app.js b/js/build/app.js
index e3c800890..463c1e582 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -2859,22 +2859,25 @@ app.directive('newsReadFile', function () {
});
};
});
-app.directive('newsRefreshMasonry', function () {
+app.directive('newsRefreshMasonry', ["$timeout", function ($timeout) {
'use strict';
- return function (scope, elem) {
- if (scope.$last) {
- var $grid = elem.parent().masonry({
- itemSelector: '.explore-feed',
+ var refresh = function (elem) {
+ $timeout(function () {
+ elem.parent().masonry({
+ itemSelector: '.grid-item',
gutter: 25,
columnWidth: 300
});
+ console.log('fresh');
+ });
+ };
- $grid.imagesLoaded().progress( function() {
- $grid.masonry('layout');
- });
+ return function (scope, elem) {
+ if (scope.$last) {
+ refresh(elem);
}
};
-});
+}]);
app.directive('newsScroll', ["$timeout", "ITEM_AUTO_PAGE_SIZE", "MARK_READ_TIMEOUT", "SCROLL_TIMEOUT", function ($timeout, ITEM_AUTO_PAGE_SIZE,
MARK_READ_TIMEOUT, SCROLL_TIMEOUT) {
'use strict';