mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(progress-circle): allow value to be set to 0 (#1536)
This commit is contained in:
committed by
Jeremy Elbourn
parent
d2c288d98a
commit
25c7fd58d4
@@ -66,6 +66,12 @@ describe('MdProgressCircular', () => {
|
||||
progressComponent.value = 50;
|
||||
expect(progressComponent.value).toBe(50);
|
||||
|
||||
progressComponent.value = 0;
|
||||
expect(progressComponent.value).toBe(0);
|
||||
|
||||
progressComponent.value = 100;
|
||||
expect(progressComponent.value).toBe(100);
|
||||
|
||||
progressComponent.value = 999;
|
||||
expect(progressComponent.value).toBe(100);
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export class MdProgressCircle implements OnDestroy {
|
||||
}
|
||||
}
|
||||
set value(v: number) {
|
||||
if (v && this.mode == 'determinate') {
|
||||
if (v != null && this.mode == 'determinate') {
|
||||
let newValue = clamp(v);
|
||||
this._animateCircle((this.value || 0), newValue, linearEase, DURATION_DETERMINATE, 0);
|
||||
this._value = newValue;
|
||||
|
||||
Reference in New Issue
Block a user