koenbok / Framer

Framer - Design Everything
https://framer.com
MIT License
5.85k stars 477 forks source link

Weird behaviour on draggable element #568

Closed yifei-zhan closed 6 years ago

yifei-zhan commented 6 years ago

Code (just copy and paste to reproduce):

# Create the draggable layer
layer = new Layer
    x: Align.center
    y: 100
    backgroundColor: 'white'

# Enable dragging - ******* comment out the following two lines of codes to see another behaviour *******
layer.draggable.enabled = true
layer.draggable.enabled = false

# define an animation
animationA = new Animation layer,
    y: 700
    options:
        time:5
animationA.start()

If you click on the layer during animation, the animation will be stoped. (even when I disable the drag) However, if you comment out the draggable code, everything works fine

SO... It seems like the animation of an element will be influenced if once I enabled the drag (even disable the drag after a while, this side effect will not disappear)

nvh commented 6 years ago

Good catch, just pushed a fix for this!