Skip to content

Commit

Permalink
Uses postRender to update the layout
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPeek committed Jan 17, 2022
1 parent 742f6b9 commit 8ef2352
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Several menu-related elements are assigned a label using the [aria-label](https:
No known limitations.

----------------------------
**Version number:** 4.1.0
**Version number:** 4.1.1
**Framework versions:** 5.8+
**Author / maintainer:** Forked from [Adapt Core](https://github.com/adaptlearning/adapt-contrib-boxmenu) / DeltaNet
**Accessibility support:** WAI AA
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-deltaboxMenu",
"version": "4.1.0",
"version": "4.1.1",
"framework": ">=5.8",
"homepage": "https://github.com/deltanet/adapt-contrib-deltaboxmenu",
"issues": "https://github.com/deltanet/adapt-contrib-deltaboxmenu/issues",
Expand Down
7 changes: 6 additions & 1 deletion js/adapt-contrib-deltaBoxMenuItemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ class DeltaBoxMenuItemView extends MenuItemView {
super.initialize();

this.listenTo(Adapt, 'device:resize', this.onDeviceResize);
}

this.$el.imageready(this.onDeviceResize.bind(this));
postRender() {
this.$el.imageready(() => {
this.setReadyStatus();
this.onDeviceResize();
});
}

onClickMenuItemButton(event) {
Expand Down

0 comments on commit 8ef2352

Please sign in to comment.