Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for .float animation #152

Merged
merged 1 commit into from
Mar 14, 2018
Merged

Fix for .float animation #152

merged 1 commit into from
Mar 14, 2018

Conversation

pigigaldi
Copy link
Contributor

In floatAnimation(offset: CGFloat) function, offsetX and offsetY was initialised with the same value and this caused a wrong animation.
Now devs can decide if they want to animate both X and Y or just one of these.

@andreamazz andreamazz merged commit 5aa5499 into andreamazz:master Mar 14, 2018
@andreamazz
Copy link
Owner

Ciao @pigigaldi
good point, merged.
Thanks! 👍

@andreamazz
Copy link
Owner

Released in 3.2.0

@pigigaldi
Copy link
Contributor Author

Ops, I think I just missed something:

switch direction {
    case .up, .none:
      offsetY = -offset
    case .left:
      offsetX = -offset
    default: break
}

-offset here should be replace with -offsetY for case .up and case .none and with -offsetX for case .left

(sorry, didn't had time to test)

@andreamazz
Copy link
Owner

Yep. Sneaky since it was using the instance property instead. I'll fix it right away.

@andreamazz
Copy link
Owner

Done in 3.2.1

@pigigaldi
Copy link
Contributor Author

Thanks! Sorry for that 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants