This commit is contained in:
parent
a907d317b8
commit
494dd15166
10 changed files with 100 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ import { playVideo } from './hero-video.js';
|
|||
import { initDropdowns } from './dropdown.js';
|
||||
import { initSwipers } from './swipers.js';
|
||||
import { initSliderBeforeAfter, progressBar, scrollBack, navInvestigation } from './investigation.js';
|
||||
import { initSort } from './sort.js';
|
||||
|
||||
const responsiveMedium = 1080;
|
||||
const responsiveSmall = 768;
|
||||
|
|
@ -36,7 +37,7 @@ window.onload = async function () {
|
|||
if (window.innerWidth >= responsiveSmall) {
|
||||
if (!msnry) {
|
||||
msnry = new Masonry(elem, {
|
||||
itemSelector: '.card--block',
|
||||
itemSelector: '.card--block:not(.is-sort-hidden)',
|
||||
columnWidth: '.grid-sizer',
|
||||
percentPosition: true,
|
||||
gutter: 26
|
||||
|
|
@ -53,6 +54,13 @@ window.onload = async function () {
|
|||
initMasonry();
|
||||
window.addEventListener('resize', initMasonry);
|
||||
|
||||
initSort(() => {
|
||||
if (msnry) {
|
||||
msnry.reloadItems();
|
||||
msnry.layout();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue