Skip to content

effects.slide: fix: reset width and height on the end of animation, #5245#314

Closed
tomykaira wants to merge 1 commit intojquery:masterfrom
tomykaira:bug_5245
Closed

effects.slide: fix: reset width and height on the end of animation, #5245#314
tomykaira wants to merge 1 commit intojquery:masterfrom
tomykaira:bug_5245

Conversation

@tomykaira
Copy link
Contributor

effects.slide: fix: reset width and height on the end of animation, get distance before wrapping. #5245-Slide Effect Broken With Relative Width

…et distance before wrapping. #5245-Slide Effect Broken With Relative Width
@tomykaira
Copy link
Contributor Author

https://gist.github.com/981270
This is my test.

@gnarf
Copy link
Member

gnarf commented May 21, 2011

Looks pretty great, I just noticed one flaw in this... Take your test case and change the border to

border: 25px solid green;

You'll notice that the bottom border is falling off of the box while it animates after your fix, but not in master...


Please also pay attention to whitespace guidlines, etc... http://wiki.jqueryui.com/w/page/12137737/Coding-standards

The commit message is really close - Use Fixed #5245 in the future to trigger the trac automation.

@gnarf
Copy link
Member

gnarf commented May 21, 2011

Here - I dug a bit further and came up with this: gnarf/jquery-ui@jquery:master...ticket-5245

This commit fixes the border issue by storing the width/height of the element before wrapping, and setting it to the px value after wrapping.

This commit is just a Unit Test.

@gnarf
Copy link
Member

gnarf commented May 21, 2011

Out of curiosity, does this bug affect any other effects? If so, we might be able to solve this in createWrapper

@tomykaira
Copy link
Contributor Author

Yes, my patch does not work with large border. And yours works well.

I found this occurs also in bounce and clip.
As you say, we should fix this problem in createWrapper.

@gnarf
Copy link
Member

gnarf commented May 22, 2011

Okay, I'm going to change the ticket on trac then - Do you want to look at doing the createWrapper solution, or should I?

@tomykaira tomykaira closed this May 22, 2011
@tomykaira
Copy link
Contributor Author

I want to modify createWrapper. I will do another pull request.

Thank you for changing the ticket and give me a good solution.

@gnarf
Copy link
Member

gnarf commented May 22, 2011

Awesome, assigning this bug to you then.

@gnarf
Copy link
Member

gnarf commented May 22, 2011

One thing to mention about modifiying this in createWrapper - it means that "width" and "height" need to be saved/restored by effects that use createWrapper now (unless they are intentionally editing them) --- You did that in this pull for this effect, but there may be others that will need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants