julianshapiro/velocity — pull request #121 by legomushroom (2014-06-23 07:38:57+00:00)
Title: Close https://github.com/julianshapiro/velocity/issues/96

The pull request consist of 3 commits.

1. 703c07e Improves slideUp and slideDown animations, by skipping redundant tweens.
2. 88fd8f7 Fixes broken animation with `border-box` box model.
3. 6ee44e3 just an amend to 1. 703c07e

they 3 close https://github.com/julianshapiro/velocity/issues/96 but I'd like to make more improvements in the future. For instance systemize all 'show' and 'hide' animations(fadeIn, fadeDown, slideIn, slideDown etc) like jquery does it, so codebase will be dry.

**More about 1 - 703c07e**
Basically sequences are created first and then we have an ability to check if particular sequence is needed (in the begin callback), so I'm setting **isSkipped** flag on the **element** and then at the **tick()** I'm **completeCall()** -ing it relying on this flag. It adds below **0.008ms** more CPU time for flag checks for every element in the **Velocity.State.calls** loop and as for me could not be considered as perf overhead. My concern is the place where **isSkipped** flag is set(right on the element itself), but without access to the tween I don't see better one now :)