aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-05-13 16:42:25 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-05-13 16:42:25 -0400
commitd699cac7cab64e868aeee8d88b16e7a76e92e483 (patch)
tree7ea23b76599dd7620460306ab8a3e75e7ffa93f3
parentf0b41a82df3ce7ea9a29e8a779a1967349f5b92a (diff)
god is good
-rw-r--r--src/client/views/collections/CollectionCardDeckView.scss1
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx16
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)}>