diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-05-26 12:16:15 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-08-10 14:27:00 +0000 |
| commit | 5523e5aa149af6e045256ba41aa3621fe15708d5 (patch) | |
| tree | 92402b522b19aa6464ab4db1be15de3ddeef3120 /addons/website/static/src/js/content/snippets.animation.js | |
| parent | 42e1d4ca600b7a5c56d4739a150628310974b1a9 (diff) | |
[IMP] website: add a direction option for the parallax
Add a setting direction for the parallax. "Top to Bottom" or "Bottom to
top". The new one was actually a specific theme option that we lost
somewhere between Odoo 8.0 and Odoo 13.0. This is now standard.
Part of https://github.com/odoo/odoo/pull/47313
task-46147
Diffstat (limited to 'addons/website/static/src/js/content/snippets.animation.js')
| -rw-r--r-- | addons/website/static/src/js/content/snippets.animation.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index d8bfef91fe9..76bb7c66f24 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -557,6 +557,11 @@ registry.Parallax = Animation.extend({ top: -this.ratio, bottom: -this.ratio, }); + + // Get parallax direction + if (this.el.dataset.scrollBackgroundDirection === 'bottom') { + this.ratio = -this.ratio; + } }, //-------------------------------------------------------------------------- |
