How to use the dom-helpers/hasClass function in dom-helpers

To help you get started, we’ve selected a few dom-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alcedo-ui / alcedo-ui / src / _vendors / PopManagement.js View on Github external
function setBodyLock() {
    const body = document.querySelector('body');
    if (!hasClass(body, 'dialog-modal-lock')) {
        addClass(body, 'dialog-modal-lock');
    }
};
github alcedo-ui / alcedo-ui / src / _vendors / TableLayout.js View on Github external
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;

}
github alcedo-ui / alcedo-ui / src / _vendors / PopManagement.js View on Github external
function setBodyUnlock() {
    const body = document.querySelector('body');
    if (hasClass(body, 'dialog-modal-lock')) {
        removeClass(body, 'dialog-modal-lock');
    }
};
github alcedo-ui / alcedo-ui / src / _vendors / TableLayout.js View on Github external
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;

}
github alcedo-ui / alcedo-ui / src / _vendors / TableLayout.js View on Github external
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;

}