|
|
|
@ -19,9 +19,7 @@ function debounce(func, wait, immediate) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function observeResize(masonry) {
|
|
|
|
|
console.log('ResizeObserver supported');
|
|
|
|
|
let resizeObserver = new ResizeObserver(debounce(function () {
|
|
|
|
|
console.log('masonry resize');
|
|
|
|
|
masonry.layout();
|
|
|
|
|
}, 100));
|
|
|
|
|
|
|
|
|
@ -49,7 +47,6 @@ function observeResizeFallback(masonry) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (isResized) {
|
|
|
|
|
console.log('masonry resize');
|
|
|
|
|
masonry.layout();
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|