Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
this._addFixedAdjustClass();
}
}
private _resetFixedShort(): void {
this._getHostElement().classList.remove(cssClasses.SHORT_HAS_ACTION_ITEM_CLASS);
this._getHostElement().classList.remove(cssClasses.SHORT_COLLAPSED_CLASS);
this._getHostElement().classList.remove(cssClasses.FIXED_SCROLLED_CLASS);
}