react-svg-morph icon indicating copy to clipboard operation
react-svg-morph copied to clipboard

easing function with MorphReplace

Open sarovin opened this issue 9 years ago • 4 comments

Can i change the easing function in MorphReplace?

i have this code but not work...

import { MorphReplace } from 'react-svg-morph';
import { easeInOutCubic } from 'react-svg-morph/lib/utils/easing';

renderLine() {
    return (
      <MorphReplace
        easing={easeInOutCubic}
        width={100}
        height={100}
        duration={1000}
        rotation="none"
      >
        {this.state.isOpen ? <OpenCurvedSVG key="open" /> : <LineSVG key="close" />}
      </MorphReplace>
    );
  }

sarovin avatar Dec 19 '16 16:12 sarovin

have the same issue, @sarovin you found a solution for that?

tomsvogel avatar Jan 01 '18 13:01 tomsvogel

@gorangajic Thanks, could you help to check whether the easing function work or not now? Thanks so much ;)

jefflung avatar Mar 06 '18 01:03 jefflung

@tomsvogel @sarovin Have you solve the easing problem yet? Thanks.

jefflung avatar Mar 07 '18 02:03 jefflung

@gorangajic @tomsvogel @sarovin I noticed in MorphReplace.js last second line, it ends with a " , " . Is it supposed to have " easing: function(t) { return t; } " as the last object?

jefflung avatar Mar 07 '18 05:03 jefflung