From d5dd74ed4f6021bc34bd31273382e849621425a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szekeres=20Ba=CC=81lint?= Date: Sat, 24 Feb 2018 20:50:38 +0100 Subject: [PATCH] initMasonry --- public/assets/js/app.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 2669acc..e610f21 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -12,17 +12,6 @@ - var masonry = new Masonry('main .files .grid', { - itemSelector: '.grid-item', - columnWidth: '.grid-sizer', - percentPosition: true, - initLayout: false, - stagger: 0, - transitionDuration: '0.6s' - }); - - - angular .module('NginxConfigIoApp', ['ngclipboard', '720kb.tooltips']) .config(function NginxCongigIoConfig($locationProvider) { @@ -34,6 +23,7 @@ /////////////////////// // PRIVATE VARIABLES // /////////////////////// + var masonry; var data = { domain: '', path: '', @@ -216,6 +206,16 @@ }); }; + $scope.initMasonry = function() { + masonry = new Masonry('main .files .grid', { + itemSelector: '.grid-item', + columnWidth: '.grid-sizer', + percentPosition: true, + stagger: 0, + transitionDuration: '0.6s' + }); + }; + /////////////////////////// @@ -328,6 +328,7 @@ // INIT // ////////// $scope.setDataFromHash(); + $scope.initMasonry(); }) .config(['tooltipsConfProvider', function (tooltipsConfProvider) { tooltipsConfProvider.configure({