Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setBodyLock() {
const body = document.querySelector('body');
if (!hasClass(body, 'dialog-modal-lock')) {
addClass(body, 'dialog-modal-lock');
}
};
function getPrevHorizontalScrollStatus(wrapperEl) {
if (!wrapperEl) {
return null;
}
if (hasClass(wrapperEl, 'scroll-left')) {
return HorizontalAlign.LEFT;
}
if (hasClass(wrapperEl, 'scroll-right')) {
return HorizontalAlign.RIGHT;
}
if (hasClass(wrapperEl, 'scroll-center')) {
return HorizontalAlign.CENTER;
}
return null;
}
function setBodyUnlock() {
const body = document.querySelector('body');
if (hasClass(body, 'dialog-modal-lock')) {
removeClass(body, 'dialog-modal-lock');
}
};
function getPrevHorizontalScrollStatus(wrapperEl) {
if (!wrapperEl) {
return null;
}
if (hasClass(wrapperEl, 'scroll-left')) {
return HorizontalAlign.LEFT;
}
if (hasClass(wrapperEl, 'scroll-right')) {
return HorizontalAlign.RIGHT;
}
if (hasClass(wrapperEl, 'scroll-center')) {
return HorizontalAlign.CENTER;
}
return null;
}
function getPrevHorizontalScrollStatus(wrapperEl) {
if (!wrapperEl) {
return null;
}
if (hasClass(wrapperEl, 'scroll-left')) {
return HorizontalAlign.LEFT;
}
if (hasClass(wrapperEl, 'scroll-right')) {
return HorizontalAlign.RIGHT;
}
if (hasClass(wrapperEl, 'scroll-center')) {
return HorizontalAlign.CENTER;
}
return null;
}