How to use the @material/top-app-bar.cssClasses.FIXED_SCROLLED_CLASS function in @material/top-app-bar

To help you get started, we’ve selected a few @material/top-app-bar 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 trimox / angular-mdc-web / packages / top-app-bar / top-app-bar.ts View on Github external
private _initTopAppBar(): void {
    if (!this.fixed) {
      this._getHostElement().classList.remove(cssClasses.FIXED_SCROLLED_CLASS);
    }

    if (this.fixed && this._getScrollOffset() > 0) {
      this._getHostElement().classList.add(cssClasses.FIXED_SCROLLED_CLASS);
    }

    if (!this.short) {
      this._getHostElement().classList.remove(cssClasses.SHORT_HAS_ACTION_ITEM_CLASS);
      this._getHostElement().classList.remove(cssClasses.SHORT_COLLAPSED_CLASS);
    }
    if (this.short && this._getScrollOffset() > 0) {
      this._getHostElement().classList.add(cssClasses.SHORT_COLLAPSED_CLASS);
    }

    if (this.shortCollapsed) {
      this._getHostElement().classList.add(cssClasses.SHORT_COLLAPSED_CLASS);
    }

    if (this.fixedAdjustElement) {
      this._removeFixedAdjustClasses();