Skip to content

Commit 076c4af

Browse files
Merge pull request mui#2047 from oliviertassinari/fix-progress
[CircularProgress] Fix transition
2 parents ac357ec + 7677be5 commit 076c4af

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/circular-progress.jsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,24 @@ const CircularProgress = React.createClass({
9999
if (!this.isMounted()) return;
100100
if (this.props.mode !== "indeterminate") return;
101101

102-
wrapper.style.transform = null;
103-
wrapper.style.transform = "rotate(0deg)";
104-
wrapper.style.transitionDuration = "0ms";
105-
wrapper.style = AutoPrefix.all(wrapper.style);
102+
AutoPrefix.set(wrapper.style, 'transform', 'rotate(0deg)');
103+
AutoPrefix.set(wrapper.style, 'transitionDuration', '0ms');
106104

107105
setTimeout(() => {
108-
wrapper.style.transform = "rotate(1800deg)";
109-
wrapper.style.transitionDuration = "10s";
110-
wrapper.style.transitionTimingFunction = "linear";
111-
wrapper.style = AutoPrefix.all(wrapper.style);
106+
AutoPrefix.set(wrapper.style, 'transform', 'rotate(1800deg)');
107+
AutoPrefix.set(wrapper.style, 'transitionDuration', '10s');
108+
AutoPrefix.set(wrapper.style, 'transitionTimingFunction', 'linear');
112109
}, 50);
113110
},
114111

115112
getDefaultProps() {
116-
return {
117-
mode: "indeterminate",
118-
value: 0,
119-
min: 0,
120-
max: 100,
121-
size: 1,
122-
};
113+
return {
114+
mode: "indeterminate",
115+
value: 0,
116+
min: 0,
117+
max: 100,
118+
size: 1,
119+
};
123120
},
124121

125122
getTheme() {

0 commit comments

Comments
 (0)