Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great, but needs control of speed #5

Closed
matthlavacka opened this issue Jun 4, 2016 · 5 comments
Closed

Great, but needs control of speed #5

matthlavacka opened this issue Jun 4, 2016 · 5 comments

Comments

@matthlavacka
Copy link

Thanks for making this, I wish there was control of speed though.

@matthlavacka
Copy link
Author

To control speed one can do the following:

addPercent() {
  const self = this;
  this.setState({
    percent: this.state.percent + 1,
  });
  setTimeout(function(){ self.changeState(); }, 100);
}

changeState() {
  this.state.percent <= 99 ? this.addPercent() : this.setState({percent: 100});
}

@iamjayk
Copy link

iamjayk commented Nov 8, 2017


return a div element and do some css animations with it

set that div className="someExampleName"

control from css

.someExampleName {
animation: speed-control linear 0.9s;                  // specify seconds for speed control
}

@keyframes speed-control {
0% { height/width/: Whatever }
50%{  height/width: increment }
100%{ height/width: to final position }

// OR //

from { }
to { } 
}

@jwmann
Copy link

jwmann commented Apr 16, 2018

@ajayk800 Can you give a more complete example? In theory this can work for a css animation in general but this uses stroke-dasharray values and transitions. I don't think it's that simple.

@salatielsql
Copy link

I did with one CSS line:

.rc-progress-circle-path { transition: stroke-dashoffset 0.9s ease 0s, stroke-dasharray 0.9s ease 0s, stroke 0.9s ease 0s, stroke-width 0.1s ease 0.9s !important; }

@xrkffgg
Copy link
Member

xrkffgg commented Nov 16, 2020

You can custom transition

transition?: string;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants