4
4
5
5
/* Animation Durations */
6
6
$md-progress-circle-duration : 5.25s !default ;
7
- $md-progress-circle-value-change-duration : $md-progress-circle-duration * 0.25 !default ;
8
7
$md-progress-circle-constant-rotate-duration : $md-progress-circle-duration * 0.55 !default ;
9
8
$md-progress-circle-sporadic-rotate-duration : $md-progress-circle-duration !default ;
10
9
11
10
/* * Component sizing */
12
11
$md-progress-circle-stroke-width : 10px !default ;
13
- $md-progress-circle-radius : 40px !default ;
14
- $md-progress-circle-circumference : $pi * $md-progress-circle-radius * 2 !default ;
15
12
// Height and weight of the viewport for md-progress-circle.
16
13
$md-progress-circle-viewport-size : 100px !default ;
17
14
@@ -24,53 +21,33 @@ $md-progress-circle-viewport-size : 100px !default;
24
21
width : $md-progress-circle-viewport-size ;
25
22
26
23
/* * SVG's viewBox is defined as 0 0 100 100, this means that all SVG children will placed
27
- based on a 100px by 100px box.
28
-
29
- The SVG and Circle dimensions/location:
30
- SVG
31
- Height: 100px
32
- Width: 100px
33
- Circle
34
- Radius: 40px
35
- Circumference: 251.3274px
36
- Center x: 50px
37
- Center y: 50px
24
+ based on a 100px by 100px box. Additionally all SVG sizes and locations are in reference to
25
+ this viewBox.
38
26
*/
39
27
svg {
40
28
height : 100% ;
41
29
width : 100% ;
42
- transform : rotate (-90deg );
43
30
transform-origin : center ;
44
31
}
45
32
46
33
47
- circle {
34
+ path {
48
35
fill : transparent ;
49
36
stroke : md-color ($md-primary , 600 );
50
37
/* * Stroke width of 10px defines stroke as 10% of the viewBox */
51
38
stroke-width : $md-progress-circle-stroke-width ;
52
- /* * SVG circle rotations begin rotated 90deg clockwise from the circle's center top */
53
- transition : stroke-dashoffset 0.225s linear ;
54
- /* * The dash array of the circle is defined as the circumference of the circle. */
55
- stroke-dasharray : $md-progress-circle-circumference ;
56
- /* * The stroke dashoffset is used to "fill" the circle, 0px represents an full circle,
57
- while the circles full circumference represents an empty circle. */
58
- stroke-dashoffset : 0px ;
59
39
}
60
40
61
-
62
- & [color = " accent" ] circle {
41
+ & [color = " accent" ] path {
63
42
stroke : md-color ($md-accent , 600 );
64
43
}
65
44
66
45
67
- & [color = " warn" ] circle {
46
+ & [color = " warn" ] path {
68
47
stroke : md-color ($md-warn , 600 );
69
48
}
70
49
71
50
72
-
73
-
74
51
& [mode = " indeterminate" ] {
75
52
animation-duration : $md-progress-circle-sporadic-rotate-duration ,
76
53
$md-progress-circle-constant-rotate-duration ;
@@ -80,14 +57,6 @@ $md-progress-circle-viewport-size : 100px !default;
80
57
linear ;
81
58
animation-iteration-count : infinite ;
82
59
transition : none ;
83
-
84
- circle {
85
- animation-duration : $md-progress-circle-value-change-duration ;
86
- animation-name : md- progress- circle- value- change;
87
- animation-timing-function : $ease-in-out-curve-function ;
88
- animation-iteration-count : infinite ;
89
- transition : none ;
90
- }
91
60
}
92
61
}
93
62
@@ -107,7 +76,3 @@ $md-progress-circle-viewport-size : 100px !default;
107
76
87.5% { transform : rotate ( 945deg ); }
108
77
100% { transform : rotate (1080deg ); }
109
78
}
110
- @keyframes md-progress-circle-value-change {
111
- 0% { stroke-dashoffset : 261.3274px ; }
112
- 100% { stroke-dashoffset : -241.3274px ; }
113
- }
0 commit comments