Coder Social home page Coder Social logo

Comments (11)

fionawhim avatar fionawhim commented on July 28, 2024 3

Happy news! It should be secretly already there. Any props you pass to VelocityComponent that it doesn't interpret itself get passed in the options hash to Velocity. So, if you put a complete property on VelocityComponent it should get called.

The Velocity docs have a list of all the options.

from velocity-react.

fionawhim avatar fionawhim commented on July 28, 2024 2

Fixed in 1.1.2, now published.

from velocity-react.

fionawhim avatar fionawhim commented on July 28, 2024

P.S.: Glad to hear you're liking it!

from velocity-react.

kristian-puccio avatar kristian-puccio commented on July 28, 2024

Thanks!

On 6 October 2015 at 00:41, Pete Hopkins [email protected] wrote:

P.S.: Glad to hear you're liking it!


Reply to this email directly or view it on GitHub
#20 (comment)
.

from velocity-react.

nathantalewis avatar nathantalewis commented on July 28, 2024

I'm not sure if you want this as a separate issue, but it looks like the complete callback doesn't fire on the leave animation of a VelocityTransitionGroup.

In the following, begin and progress work happily, but complete is never called.

getInitialState() {
  return { maximize: undefined };
},

changeStateToMaximize() {
  this.setState({maximize: true});
},

render() {
  return (<VelocityTransitionGroup
      enter={{ animation: "slideDown" }}
      leave={{ animation: { height: "100%" },
        begin: () => console.log("Beginning..."),
        progress: () => console.log("Progress..."),
        complete: () => console.log("Completed.") }}
      runOnMount={true} >
    {this.state.maximize !== undefined ? undefined : (<div key="default" style={{ bottom: 0, height: "200px", left: 0, position: "fixed", width: "100%" }}>
      <div onClick={this.changeStateToMaximize}>
        Inner text
      </div>
    </div>)}
  </VelocityTransitionGroup>);
}

from velocity-react.

bsalex avatar bsalex commented on July 28, 2024

@nathantalewis, did you find any workaround?

from velocity-react.

nathantalewis avatar nathantalewis commented on July 28, 2024

@bsalex, sorry no. We ended up going with react-gsap-enhancer instead. https://github.com/azazdeaz/react-gsap-enhancer

from velocity-react.

bsalex avatar bsalex commented on July 28, 2024

Just in case anyone else has the same problem.
We've ended up using progress(elements, complete) callback, checking for complete === 1

from velocity-react.

fionawhim avatar fionawhim commented on July 28, 2024

This is a bug in velocity-react. ReactTransitionGroup clobbers the complete callback. I can look into fixing this, though if anyone wants to take a go at it LMK.

from velocity-react.

fionawhim avatar fionawhim commented on July 28, 2024

Put up #53 for this. Anyone who wants complete for VelocityTransitionGroup care to try it out?

from velocity-react.

py-in-the-sky avatar py-in-the-sky commented on July 28, 2024

I just gave the latest of master a try. Works brilliantly! Thank you!

When do you plan on your next npm release?

from velocity-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.