metafizzy / outlayer

:construction_worker: the brains & guts of a layout library
163 stars 63 forks source link

Set ontransitionend handler on all properties that will transition when an item is hidden. #28

Closed danofames closed 8 years ago

danofames commented 9 years ago

That the hiddenStyle option needs a declaration that actually hides the card is more obvious in hindsight, but it was unexpected to me that overriding hiddenStyle led to the items remaining visible after they were filtered by the isotope.filter call.

This change was an approach that fixes that behavior, and seemed to have minimal impact. It is suboptimal that the handler would execute for any properties in hiddenStyle.

The unexpected nature could be solved by a note in documentation.

I could also see removing the onTransitionEnd handler in Item.hide, and leave the hiding of the item up to the hiddenStyle option completely. Part of the confusion is that the items are hidden without any overrides to hiddenStyle. As default behavior, this should occur unless a specific request to prevent the hiding after the transition is done is made.

desandro commented 8 years ago

Thank you for this contribution. Item now checks for the property to watch so it can trigger transition end callback in getHideRevealTransitionEndProperty. I've left this PR open for a while in case others were interested. Time to close it up :strawberry: