Skip to content

Commit

Permalink
Merge pull request #2047 from oliviertassinari/fix-progress
Browse files Browse the repository at this point in the history
[CircularProgress] Fix transition
  • Loading branch information
oliviertassinari committed Nov 3, 2015
2 parents ac357ec + 7677be5 commit 076c4af
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions src/circular-progress.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,24 @@ const CircularProgress = React.createClass({
if (!this.isMounted()) return;
if (this.props.mode !== "indeterminate") return;

wrapper.style.transform = null;
wrapper.style.transform = "rotate(0deg)";
wrapper.style.transitionDuration = "0ms";
wrapper.style = AutoPrefix.all(wrapper.style);
AutoPrefix.set(wrapper.style, 'transform', 'rotate(0deg)');
AutoPrefix.set(wrapper.style, 'transitionDuration', '0ms');

setTimeout(() => {
wrapper.style.transform = "rotate(1800deg)";
wrapper.style.transitionDuration = "10s";
wrapper.style.transitionTimingFunction = "linear";
wrapper.style = AutoPrefix.all(wrapper.style);
AutoPrefix.set(wrapper.style, 'transform', 'rotate(1800deg)');
AutoPrefix.set(wrapper.style, 'transitionDuration', '10s');
AutoPrefix.set(wrapper.style, 'transitionTimingFunction', 'linear');
}, 50);
},

getDefaultProps() {
return {
mode: "indeterminate",
value: 0,
min: 0,
max: 100,
size: 1,
};
return {
mode: "indeterminate",
value: 0,
min: 0,
max: 100,
size: 1,
};
},

getTheme() {
Expand Down

0 comments on commit 076c4af

Please sign in to comment.