diff --git a/src/lib/button/button.html b/src/lib/button/button.html index d13ade40bef4..d29f2dc600a4 100644 --- a/src/lib/button/button.html +++ b/src/lib/button/button.html @@ -1,6 +1,6 @@
diff --git a/src/lib/button/button.ts b/src/lib/button/button.ts index 29a12d1d3173..029e152a12dc 100644 --- a/src/lib/button/button.ts +++ b/src/lib/button/button.ts @@ -106,6 +106,12 @@ export class MdButton { /** Whether a mousedown has occurred on this element in the last 100ms. */ _isMouseDown: boolean = false; + /** Whether the button is round. */ + _isRoundButton: boolean = ['icon-button', 'fab', 'mini-fab'].some(suffix => { + let el = this._getHostElement(); + return el.hasAttribute('md-' + suffix) || el.hasAttribute('mat-' + suffix); + }); + /** Whether the ripple effect on click should be disabled. */ private _disableRipple: boolean = false; private _disabled: boolean = null; @@ -165,13 +171,6 @@ export class MdButton { return this._elementRef.nativeElement; } - _isRoundButton() { - const el = this._getHostElement(); - return el.hasAttribute('md-icon-button') || - el.hasAttribute('md-fab') || - el.hasAttribute('md-mini-fab'); - } - _isRippleDisabled() { return this.disableRipple || this.disabled; }