fix(progress-spinner): fallback animation not working (#7599)

Fixes #7599.
This commit is contained in:
Kristiyan Kostadinov
2017-10-06 22:23:51 +02:00
committed by Kara
parent 746799fbed
commit 4bb696e8e5
3 changed files with 8 additions and 4 deletions
@@ -19,6 +19,5 @@
[style.animation-name]="'mat-progress-spinner-stroke-rotate-' + diameter"
[style.stroke-dashoffset.px]="_strokeDashOffset"
[style.stroke-dasharray.px]="_strokeCircumference"
[style.transform.rotate]="'360deg'"
[style.stroke-width.px]="strokeWidth"></circle>
</svg>

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 772 B

@@ -14,9 +14,9 @@ $_mat-progress-spinner-default-circumference: $pi * $_mat-progress-spinner-defau
svg {
position: absolute;
transform: translate(-50%, -50%) rotate(-90deg);
top: 50%;
left: 50%;
transform: rotate(-90deg);
top: 0;
left: 0;
transform-origin: center;
overflow: visible;
}
@@ -165,6 +165,11 @@ export class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements
return this._strokeCircumference * (100 - this._value) / 100;
}
// In fallback mode set the circle to 80% and rotate it with CSS.
if (this._fallbackAnimation && this.mode === 'indeterminate') {
return this._strokeCircumference * 0.2;
}
return null;
}