[FIX] website_animate: fix drag n drop an animated snippet
Before this commit, when drag n drop a snippet to move it in a website
page, the snippet was invisible after the drop.
task-2215118
closes odoo/design-themes#473
X-original-commit: 7c2962779b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -22,24 +22,6 @@ function forceAnimation() {
|
|||||||
|
|
||||||
// Animations
|
// Animations
|
||||||
sOptions.registry.o_animate = sOptions.Class.extend({
|
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
|
// Options
|
||||||
|
|||||||
@@ -150,6 +150,14 @@ publicWidget.registry.WebsiteAnimate = publicWidget.Widget.extend({
|
|||||||
destroy: function () {
|
destroy: function () {
|
||||||
WebsiteAnimate.$scrollingElement[0].classList.remove('o_wanim_overflow_x_hidden');
|
WebsiteAnimate.$scrollingElement[0].classList.remove('o_wanim_overflow_x_hidden');
|
||||||
this._super.apply(this, arguments);
|
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': '',
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user