diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-11-03 12:52:47 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-11-22 17:15:33 +0100 |
| commit | 0e08e653cd47e6ef00cf041d774ddec4b83431c1 (patch) | |
| tree | 2cdb0a5745d623daad040fca60aefb0bc691bcac /addons/web_editor/static/src/less/web_editor.common.less | |
| parent | 7594ed7c288b87c6f6ba9658c18bea7c999f1d2e (diff) | |
[IMP] website: allow better animations thanks to requestAnimationFrame
This commit extends the behavior of the Animation class of the
"web_editor.snippets.animation" module.
Now, all animations can easily define an animation algo update without
much caring about performances. All that must be done is:
* If the "start"/"stop" method is/are defined, do not forget to call
the _super parent method (which will now initializes the animation
components).
* Define particulary-named method in your Animation class extension.
See in-code comment of the _prepareComponents method.
This extension should be used to define all animations. For example the
use of $(window).scroll(function () { /* do stuff */ }) is now the same
as defining the function with on_scroll: function () { /* do stuff */ }
except that the later one will be more efficient, smoother and allow
you to not care about throttling / event binding/unbinding / ...
Diffstat (limited to 'addons/web_editor/static/src/less/web_editor.common.less')
0 files changed, 0 insertions, 0 deletions
