Skip to content

Commit

Permalink
reuse entityTransform in mountEntityCard
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed Dec 21, 2024
1 parent 9218804 commit 004210e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/mixins/bookshelfCardsHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 004210e

Please sign in to comment.