diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js index 105046d9f..8f245f152 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js @@ -133,8 +133,13 @@ var AdvPathCardGroup = CardGroup.extend({ var cardCount = cardsToLayout.length; var totalHeight = 0; - for (var cardIndex in cardsToLayout) - totalHeight += cardsToLayout[cardIndex].data("card").getHeightForWidth(this.width); + for (var cardIndex in cardsToLayout) { + var cardData = cardsToLayout[cardIndex].data("card"); + var cardHeight = cardData.getHeightForWidth(this.width); + totalHeight += cardHeight; + if (cardData.attachedCards.length > 0) + totalHeight += cardHeight * 0.2; + } var resultPadding = Math.min(this.padding, (this.height - totalHeight) / (cardCount - 1)); @@ -146,6 +151,9 @@ var AdvPathCardGroup = CardGroup.extend({ var cardData = cardElem.data("card"); var cardHeight = (cardElem.data("card").getHeightForWidth(this.width)); + if (cardData.attachedCards.length > 0) + y += cardHeight * 0.1; + cardData.tokens = {}; if (this.positions != null) { for (var i = 0; i < this.positions.length; i++) @@ -169,6 +177,9 @@ var AdvPathCardGroup = CardGroup.extend({ this.layoutCard(cardElem, x, y, this.width, cardHeight, index); + if (cardData.attachedCards.length > 0) + y += cardHeight * 0.1; + y += cardHeight + resultPadding; index++; }