diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-11-12 13:06:48 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-11-12 13:06:48 +0100 |
| commit | 99d0e1b80e5b2d5eb59b96c6ce1bf246f8df2326 (patch) | |
| tree | 6c53282f8a22e9b59d83762ebe057173172c5f63 /addons/website/static/src/js | |
| parent | 4d53266e236d1816e45b13aa50bcafb1bab2bc8c (diff) | |
| parent | a403155dec769418ede3c9128a887847f97a956f (diff) | |
[MERGE] forward port branch 12.0 up to a403155dec7
Diffstat (limited to 'addons/website/static/src/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({ |
