From 004210ee02ec9e518450e824101aa8c782797d7b Mon Sep 17 00:00:00 2001 From: mikiher Date: Sat, 21 Dec 2024 17:48:22 +0200 Subject: [PATCH] reuse entityTransform in mountEntityCard --- client/mixins/bookshelfCardsHelpers.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/mixins/bookshelfCardsHelpers.js b/client/mixins/bookshelfCardsHelpers.js index 01a6869b..d3e18128 100644 --- a/client/mixins/bookshelfCardsHelpers.js +++ b/client/mixins/bookshelfCardsHelpers.js @@ -132,10 +132,7 @@ export default { this.entityComponentRefs[index] = instance instance.$mount() - const shelfOffsetY = this.shelfPaddingHeight * this.sizeMultiplier - const row = index % this.entitiesPerShelf - const shelfOffsetX = row * this.totalEntityCardWidth + this.bookshelfMarginLeft - instance.$el.style.transform = `translate3d(${shelfOffsetX}px, ${shelfOffsetY}px, 0px)` + instance.$el.style.transform = this.entityTransform((index % this.entitiesPerShelf) + 1) instance.$el.classList.add('absolute', 'top-0', 'left-0') shelfEl.appendChild(instance.$el)