Skip to content

Commit

Permalink
Merge pull request #110 from h5p/feature/JI-6258-resize-on-image-load
Browse files Browse the repository at this point in the history
JI-6258 trigger resize when the image has been loaded
  • Loading branch information
Gwenillia authored Jun 6, 2024
2 parents 4e2dd59 + 684c6a9 commit 1bf0557
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/image-hotspots.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ H5P.ImageHotspots = (function ($, EventDispatcher) {
// Ignore image if no alternative text for assistive technologies
this.$image.attr('aria-hidden', true);
}

this.$image.on('load', () => this.trigger('resize'));
}

var isSmallDevice = function () {
Expand Down

0 comments on commit 1bf0557

Please sign in to comment.