From efa283a93ea278d6b026c5972b96c3f4aa43cbeb Mon Sep 17 00:00:00 2001 From: cedric lombardot Date: Mon, 25 May 2015 11:47:19 +0200 Subject: [PATCH] Enable to configure cards-space --- ionic.tdcards.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ionic.tdcards.js b/ionic.tdcards.js index 76213df..20b5464 100644 --- a/ionic.tdcards.js +++ b/ionic.tdcards.js @@ -395,7 +395,9 @@ restrict: 'E', template: '
', transclude: true, - scope: {}, + scope: { + 'cardsSpace': '@' + }, controller: ['$scope', '$element', function($scope, $element) { var cards; var firstCard, secondCard, thirdCard; @@ -411,7 +413,7 @@ card = existingCards[i]; if(!card) continue; if(i > 0) { - card.style.transform = card.style.webkitTransform = 'translate3d(0, ' + (i * 4) + 'px, 0)'; + card.style.transform = card.style.webkitTransform = 'translate3d(0, ' + (i * ($scope.cardsSpace || 4)) + 'px, 0)'; } card.style.zIndex = (existingCards.length - i); }