1

I want to have an animation scale up with scaleY to fill up a view. The problem is that it starts from the center instead of the bottom. How can I change it so that animation starts from the bottom?

 const fillAnim = {
    0: {
        transform: [{ scaleY: 0 }]
    },
    0.25: {
        transform: [{ scaleY: 0 }]
    },
    0.5: {
        transform: [{ scaleY: 1 }]
    },
    0.75: {
        transform: [{ scaleY: 1 }]
    },
    1: {
        transform: [{ scaleY: 0 }]
    }
};

I am using react-native-animatable for this animation.

BFP
  • 124
  • 1
  • 9
  • Does this answer your question? [React Native Transform Origin](https://stackoverflow.com/questions/52561376/react-native-transform-origin) – ulou May 24 '21 at 20:11
  • No, I tried to use the translation trick but nothing changed. – BFP May 25 '21 at 00:31

1 Answers1

0
transform-origin: bottom;

should fix the issue.

can
  • 36
  • 2