summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-05-26 12:16:15 +0000
committerqsm-odoo <qsm@odoo.com>2020-08-10 14:27:00 +0000
commit5523e5aa149af6e045256ba41aa3621fe15708d5 (patch)
tree92402b522b19aa6464ab4db1be15de3ddeef3120 /addons/website/static/src/js
parent42e1d4ca600b7a5c56d4739a150628310974b1a9 (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')
-rw-r--r--addons/website/static/src/js/content/snippets.animation.js5
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;
+ }
},
//--------------------------------------------------------------------------