[FIX] website_animate: fix each time it becomes visible option

Before this commit, the option "each time it becomes visible" did not
work in edit mode.

task-2630112

closes odoo/design-themes#489

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Benjamin Vray
2021-08-23 08:46:09 +00:00
parent d8e547ceab
commit 87233c988b
@@ -45,7 +45,7 @@ var WebsiteAnimate = {
var direction = (windowTop < lastScroll) ? -1 : 1;
lastScroll = windowTop;
self.items.each(function () {
$(".o_animate").each(function () {
var $el = $(this);
var elHeight = $el.height();
var elOffset = direction * Math.max((elHeight * self.offsetRatio), self.offsetMin);