vue-anime icon indicating copy to clipboard operation
vue-anime copied to clipboard

Question. Dynamic prop

Open denis-gorin opened this issue 6 years ago • 3 comments

hi is it possible to have dynamic property for Object Animation?

denis-gorin avatar Aug 16 '18 09:08 denis-gorin

vue-anime is based on animejs which require to specify the 'begin' and 'end' value of something numeric and do the transformation based on easing function

would you provide more information?

liuhann avatar Sep 26 '18 01:09 liuhann

I also ran into this issue when creating an animation.

I'm trying to do something like this: <vue-anime :animate="animationProps" ....

  data() {
    return {
      animationProps: {
        translateX: 250
      }
    }
  }

And than change the translateX property when needed and play the animation again with this.$refs.XXX.play(). This however seems not to work, the animation is only played with the initial value. This would make a nice enhancement.

gerwinov avatar Sep 26 '18 08:09 gerwinov

Hi You can change animationProps to work!

and if you only set animationProps.translateX, call reset() method to reset animation

liuhann avatar Oct 30 '18 01:10 liuhann