Skip to content

Effects.core: Storing size and setting in createWrapper for applied to all effects.#326

Closed
tomykaira wants to merge 12 commits intojquery:masterfrom
tomykaira:bug_5245
Closed

Effects.core: Storing size and setting in createWrapper for applied to all effects.#326
tomykaira wants to merge 12 commits intojquery:masterfrom
tomykaira:bug_5245

Conversation

@tomykaira
Copy link
Contributor

Effects.core: Storing size and setting in createWrapper for applied to all effects. Fixed #5245 - Relative width elements break when wrapped for effects.

This is discussed in #314 . Since this size problem is common among effects, I modified createWrapper and made it always store / set element size.

Testcase is included.

Acknowledgement: gnarf37.

tomykaira and others added 5 commits May 20, 2011 02:17
…et distance before wrapping. #5245-Slide Effect Broken With Relative Width
…o force a px value instead of a % being carried over. Fixes #5245 - Slide Effect Broken With Relative Width
…o all effects. Fixed #5245 - Relative width elements break when wrapped for effects
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is now done in the createWrapper - perhaps we should change the unit test to just call createWrapper and then check the width?

Change the module("effects.core") test( "createWrapper recalculates relative widths" )

And rather than .slide() just wrap up the relative width element and test its width before/after?

@gnarf
Copy link
Member

gnarf commented May 22, 2011

As mentioned on the other pull - there are other effects that use createWrapper that we now need to make sure save/restore the width/height like you did for slide....

@tomykaira
Copy link
Contributor Author

Sure. I moved the test to each.

Now all effects are tested with gnarf's code, and pass.

@gnarf
Copy link
Member

gnarf commented May 23, 2011

And what about all the other effects, like drop that now do not save / restore the width and height?

@tomykaira
Copy link
Contributor Author

The unit test says that exactly all effects (including drop, fade, fold and others not yet mentioned) works correctly.

I checked the behavior with eyes in https://gist.github.com/986073 .

I forgot testing height, so added it.

@gnarf
Copy link
Member

gnarf commented May 23, 2011

Here -- Maybe this commit will better illustrate the problem I'm talking about...

All of those tests that are now failing will need to add "width", "height" to their saved props arrays...

Edited: Change my commit link, I had left a console.log in there accidentaly

@tomykaira
Copy link
Contributor Author

Okey, the point was "restoring".

I added "width", "height" to all props, except "size".
In "size", I set restore always true, if mode is show/hide.

@gnarf
Copy link
Member

gnarf commented Jun 10, 2011

Thanks! Landed in 2c81518

@gnarf gnarf closed this Jun 10, 2011
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