@pegakit/pegakit
Version:
The living styleguide, pattern library, UI ToolKit, and front-end build tools that power Pega's digital web properties.
10 lines (7 loc) • 393 B
JavaScript
var docElem = document.documentElement;
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.loadMode = 1;
window.lazySizesConfig.hFac = .1;
//set expand to a higher value on larger displays
window.lazySizesConfig.expand = Math.max(Math.min(docElem.clientWidth, docElem.clientHeight), 400);
window.lazySizesConfig.expFactor = lazySizesConfig.expand < 500 ? 2.5 : 2;