@@ -44,26 +44,30 @@ export class MatProgressSpinnerBase {
44
44
}
45
45
export const _MatProgressSpinnerMixinBase = mixinColor ( MatProgressSpinnerBase , 'primary' ) ;
46
46
47
+ // .0001 percentage difference is necessary in order to avoid unwanted animation frames
48
+ // for example because the animation duration is 4 seconds, .1% accounts to 4ms
49
+ // which are enough to see the flicker described in
50
+ // https://github.com/angular/material2/issues/8984
47
51
const INDETERMINATE_ANIMATION_TEMPLATE = `
48
52
@keyframes mat-progress-spinner-stroke-rotate-DIAMETER {
49
53
0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }
50
54
12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }
51
- 12.51 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
55
+ 12.5001 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
52
56
25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
53
57
54
- 25.1 % { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }
58
+ 25.0001 % { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }
55
59
37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }
56
- 37.51 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
60
+ 37.5001 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
57
61
50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
58
62
59
- 50.01 % { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }
63
+ 50.0001 % { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }
60
64
62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }
61
- 62.51 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
65
+ 62.5001 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
62
66
75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
63
67
64
- 75.01 % { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }
68
+ 75.0001 % { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }
65
69
87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }
66
- 87.51 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
70
+ 87.5001 % { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
67
71
100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
68
72
}
69
73
` ;
0 commit comments