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

transforms should not be cloned on then #67

Closed
wants to merge 1 commit into from
Closed

transforms should not be cloned on then #67

wants to merge 1 commit into from

Conversation

bruce-lindsay
Copy link

When calling "then", the transforms are being cloned. This results in the following code not functioning properly when run with the markup from /examples/transform.html.

move('#square').rotate(300).duration('2s').then().rotate(0).duration('1s').pop().end()

expected the square should transition to the 300 degree rotation over 2 seconds then return to 0 degree rotation over 1 second.
actual the square transitions to 300 degree rotation over 2 seconds but the style property is set to rotate(300deg); rotate(0deg) when the 1s transition executes.

@bruce-lindsay
Copy link
Author

I think there is a deeper issue with the transforms handling. Although this accomplishes a fix for one use case it doesn't fix the following (which is an issue in both my PR and current master 5299f9d)

move('#square')
  .rotate(180)
  .scale(.5)
  .end(function(){
    move('#square')
      .rotate(0)
      .end();
      });

expected object is scaled at .5 with no rotation after the second animation ends.
actual object is no longer scaled

Closing PR.

@bruce-lindsay bruce-lindsay reopened this Mar 26, 2015
@bruce-lindsay
Copy link
Author

New commit works for both use cases. 😃

@A A self-assigned this Dec 6, 2015
@bruce-lindsay bruce-lindsay deleted the transforms-no-clone branch November 26, 2018 17:38
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