diff --git a/website_animate/static/src/js/o_animate.editor.js b/website_animate/static/src/js/o_animate.editor.js index 1e16ed68a..5adf905aa 100644 --- a/website_animate/static/src/js/o_animate.editor.js +++ b/website_animate/static/src/js/o_animate.editor.js @@ -22,24 +22,6 @@ function forceAnimation() { // Animations sOptions.registry.o_animate = sOptions.Class.extend({ - /** - * @override - */ - cleanForSave: function () { - // Clean elements - this.$target.removeClass('o_animating o_animated o_animate_preview') - .css({ - 'animation-name': '', - 'animation-play-state': '', - 'visibility': '', - }); - if (this.$target.hasClass('o_animate')) { - this.$target.css('animation-play-state', 'paused'); - } - - // Clean all inView elements - $('#wrapwrap').find('.o_animate').removeClass('o_visible'); - }, //-------------------------------------------------------------------------- // Options diff --git a/website_animate/static/src/js/o_animate.frontend.js b/website_animate/static/src/js/o_animate.frontend.js index 8ffaffae0..b87ad1214 100644 --- a/website_animate/static/src/js/o_animate.frontend.js +++ b/website_animate/static/src/js/o_animate.frontend.js @@ -150,6 +150,14 @@ publicWidget.registry.WebsiteAnimate = publicWidget.Widget.extend({ destroy: function () { WebsiteAnimate.$scrollingElement[0].classList.remove('o_wanim_overflow_x_hidden'); this._super.apply(this, arguments); + + this.$target.find('.o_animate') + .removeClass('o_animating o_animated o_animate_preview') + .css({ + 'animation-name': '', + 'animation-play-state': '', + 'visibility': '', + }); }, });