diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionCardDeckView.scss | 1 | ||||
-rw-r--r-- | src/client/views/collections/CollectionCardDeckView.tsx | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.scss b/src/client/views/collections/CollectionCardDeckView.scss index 222a1d226..09d6f70ea 100644 --- a/src/client/views/collections/CollectionCardDeckView.scss +++ b/src/client/views/collections/CollectionCardDeckView.scss @@ -67,6 +67,7 @@ button { .card-item-active, .card-item { + position: relative; transition: transform 0.3s ease-in-out; } diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx index 80159ae38..996c5711b 100644 --- a/src/client/views/collections/CollectionCardDeckView.tsx +++ b/src/client/views/collections/CollectionCardDeckView.tsx @@ -332,7 +332,13 @@ export class CollectionCardView extends CollectionSubView() { return realIndex % 10; } - translateOverflowX(realIndex: number, calcRowCards: number) { + translateOverflowX(realIndex: number, calcIndex: number, calcRowCards: number) { + + let trans = 0; + + // trans += (calcIndex * this.panelWidth()) + this.panelWidth() + + // return trans if (realIndex < this.maxRowCount) { return 0; } @@ -398,10 +404,10 @@ export class CollectionCardView extends CollectionSubView() { width: this.panelWidth(), height: this.panelHeight(childPair.layout)(), transform: ` - rotate(${!isSelected ? this.rotate(amCards, calcRowIndex) : 0}deg) - translateY(${this.calculateTranslateY(isHovered, isSelected, realIndex, amCards, calcRowIndex)}px) - translateX(${isSelected ? this.translateSelected(calcRowIndex) : this.translateOverflowX(realIndex, amCards)}px) - scale(${isSelected ? 1.25 : 1}) + translateY(${this.calculateTranslateY(isHovered, isSelected, realIndex, amCards, calcRowIndex)}px) + translateX(${isSelected ? this.translateSelected(calcRowIndex) : this.translateOverflowX(realIndex, calcRowIndex, amCards)}px) + rotate(${!isSelected ? this.rotate(amCards, calcRowIndex) : 0}deg) + scale(${isSelected ? 1.25 : 1}) `, }} onMouseEnter={() => this.setHoveredNodeIndex(index)}> |