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

Rotate animation is triggering scaling #118

Closed
zapletnev opened this issue Apr 14, 2017 · 0 comments
Closed

Rotate animation is triggering scaling #118

zapletnev opened this issue Apr 14, 2017 · 0 comments
Assignees
Milestone

Comments

@zapletnev
Copy link
Contributor

zapletnev commented Apr 14, 2017

        let mainButton = Shape(
            form: Circle(r: 30),
            fill: Color(val: 0x7C93FE)
        )
        
        let imageName = "plus"
        let plusUIImage = UIImage(named: imageName)!
        let plusImage = Image(
            src: imageName,
            place: Transform.move(
                dx: -Double(plusUIImage.size.width) / 2,
                dy:  -Double(plusUIImage.size.height) / 2
            )
        )
        let badNode = [mainButton, plusImage].group()
        badNode.place = Transform.move(dx: viewSize.w / 2, dy: viewSize.h/2)
        self.node = badNode
        
        node.onTouchPressed { f in
            let toTransform = badNode.place.rotate(angle: M_PI / 2)
            let rotateAnimation = badNode.placeVar.animation(to: toTransform)
            rotateAnimation.play()

        }
@ystrot ystrot added this to the 0.9.0 milestone May 10, 2017
@ystrot ystrot modified the milestones: 0.9.0, 0.8.3 Sep 19, 2017
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

No branches or pull requests

3 participants