Resize the container based on media loads.

This commit is contained in:
Dermot Duffy
2023-09-04 19:31:54 -07:00
parent 1554cb41e8
commit d425457781
5 changed files with 19 additions and 16 deletions
+2 -4
View File
@@ -47,12 +47,10 @@ export class MediaGridController {
protected _idAttribute: string;
protected _throttledLayout = throttle(
() => {
window.requestAnimationFrame(() => this._masonry?.layout?.());
},
() => this._masonry?.layout?.(),
// Throttle layout calls to larger than the masonry.js transitionDuration
// value specified below.
400,
300,
{ trailing: true, leading: false },
);