How to use the @material/dialog.MDCDialogFoundation.numbers function in @material/dialog

To help you get started, we’ve selected a few @material/dialog 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 rx / presenters / views / mdc / assets / js / components / dialogs.js View on Github external
function hideDialog(action = '') {
    this.isOpen_ = false;
    this.adapter_.addClass(MDCDialogFoundation.cssClasses.CLOSING);
    this.adapter_.removeClass(MDCDialogFoundation.cssClasses.OPEN);
    this.adapter_.removeBodyClass(MDCDialogFoundation.cssClasses.SCROLL_LOCK);

    cancelAnimationFrame(this.animationFrame_);
    this.animationFrame_ = 0;

    clearTimeout(this.animationTimer_);
    this.animationTimer_ = setTimeout(() => {
        this.adapter_.releaseFocus();
        this.handleAnimationTimerEnd_();
        this.adapter_.notifyClosed(action);
    }, MDCDialogFoundation.numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);
}