From e4712fc467a4ce7592f7d377f16f1af0436b22fe Mon Sep 17 00:00:00 2001 From: Maximilian Zellhofer Date: Thu, 28 Apr 2016 00:09:34 +0200 Subject: [PATCH] override baseClass and thumbClass Added possibility to override baseClass and thumbClass via the directive's attributes --- src/js/ngGallery.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/ngGallery.js b/src/js/ngGallery.js index 56e7dbf..a608722 100644 --- a/src/js/ngGallery.js +++ b/src/js/ngGallery.js @@ -10,6 +10,7 @@ var defaults = { baseClass: 'ng-gallery', thumbClass: 'ng-thumb', + thumbsNum: 3, // should be odd templateUrl: 'ng-gallery.html' }; @@ -23,7 +24,7 @@ function setScopeValues(scope, attrs) { scope.baseClass = scope.class || defaults.baseClass; scope.thumbClass = scope.thumbClass || defaults.thumbClass; - scope.thumbsNum = scope.thumbsNum || 3; // should be odd + scope.thumbsNum = scope.thumbsNum || defaults.thumbsNum; } var template_url = defaults.templateUrl; @@ -59,6 +60,8 @@ scope: { images: '=', thumbsNum: '@', + baseClass: '@', + thumbsClass: '@', hideOverflow: '=' }, controller: [