Skip to content

Commit

Permalink
fix(tab-nav-bar): ripples still showing up when globally disabled (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion authored and josephperrott committed Jun 29, 2018
1 parent 2433439 commit 4f3cbfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/lib/tabs/tab-nav-bar/tab-nav-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ export class MatTabLink extends _MatTabLinkMixinBase
/** Reference to the RippleRenderer for the tab-link. */
protected _tabLinkRipple: RippleRenderer;

/** Whether the ripples are globally disabled through the RippleGlobalOptions */
private _ripplesGloballyDisabled = false;

/** Whether the link is active. */
@Input()
get active(): boolean { return this._isActive; }
Expand All @@ -210,7 +213,8 @@ export class MatTabLink extends _MatTabLinkMixinBase
* @docs-private
*/
get rippleDisabled(): boolean {
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple;
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||
this._ripplesGloballyDisabled;
}

constructor(private _tabNavBar: MatTabNav,
Expand All @@ -227,6 +231,7 @@ export class MatTabLink extends _MatTabLinkMixinBase
this.tabIndex = parseInt(tabIndex) || 0;

if (globalOptions) {
this._ripplesGloballyDisabled = !!globalOptions.disabled;
// TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
this.rippleConfig = {
terminateOnPointerUp: globalOptions.terminateOnPointerUp,
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function setFileResult(database: Database, prNumber: string, fileName: string, r

/** Sets the full diff result for the current Pull Request that runs inside of Travis. */
function setPullRequestResult(database: Database, prNumber: string, result: boolean) {
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha).set(result);
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha!).set(result);
}

/** Returns the Firebase Reference that contains all data related to the specified PR. */
Expand Down

0 comments on commit 4f3cbfe

Please sign in to comment.