diff options
Diffstat (limited to 'addons/website/static/src/js/content/snippets.animation.js')
| -rw-r--r-- | addons/website/static/src/js/content/snippets.animation.js | 8 |
1 files changed, 8 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 2833e5b5318..a0b25c75b01 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -435,6 +435,7 @@ registry.slider = Animation.extend({ */ start: function () { if (!this.editableMode) { + this.$('img').on('load.slider', this._onImageLoaded.bind(this)); this._computeHeights(); } this.$target.carousel(); @@ -445,6 +446,7 @@ registry.slider = Animation.extend({ */ destroy: function () { this._super.apply(this, arguments); + this.$('img').off('.slider'); this.$target.carousel('pause'); this.$target.removeData('bs.carousel'); _.each(this.$('.carousel-item'), function (el) { @@ -487,6 +489,12 @@ registry.slider = Animation.extend({ _onEditionSlide: function () { this._computeHeights(); }, + /** + * @private + */ + _onImageLoaded: function () { + this._computeHeights(); + }, }); registry.parallax = Animation.extend({ |
