Skip to content

Commit

Permalink
masonry tweak no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Nov 8, 2024
1 parent 77972aa commit 444f0e2
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions assets/js/grid-masonry.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ const prplResizeGridItem = ( item ) => {
( elHeight + paddingTop + paddingBottom ) / rowHeight
);
item.style.gridRowEnd = 'span ' + ( rowSpan + 1 );

// If this is the last item and taller than the 2 previous items, move it to the 1st column.
if (
item.nextElementSibling === null &&
item.getBoundingClientRect().height >
item.previousElementSibling.getBoundingClientRect().height &&
item.getBoundingClientRect().height >
item.previousElementSibling.previousElementSibling.getBoundingClientRect()
.height
) {
item.style.gridColumn = '1';
}
};

/**
Expand Down

0 comments on commit 444f0e2

Please sign in to comment.