summaryrefslogtreecommitdiffstats
path: root/js/directive/NewsRefreshMasonry.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/directive/NewsRefreshMasonry.js')
-rw-r--r--js/directive/NewsRefreshMasonry.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/js/directive/NewsRefreshMasonry.js b/js/directive/NewsRefreshMasonry.js
index fcefed25c..a921de13d 100644
--- a/js/directive/NewsRefreshMasonry.js
+++ b/js/directive/NewsRefreshMasonry.js
@@ -7,16 +7,18 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
-app.directive('newsRefreshMasonry', function () {
+app.directive('newsRefreshMasonry', function ($timeout) {
'use strict';
var refresh = function (elem) {
-
- elem.parent().masonry({
- itemSelector: '.grid-item',
- gutter: 25,
- columnWidth: 300
+ $timeout(function () {
+ $timeout(function () {
+ elem.parent().masonry({
+ itemSelector: '.grid-item',
+ gutter: 25,
+ columnWidth: 300
+ });
});
-
+ });
};
return function (scope, elem) {