Skip to content

Commit

Permalink
Fixes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPeek committed Feb 27, 2019
1 parent 8fb5bbd commit 02b2c35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The Icon popup attribute group contains values for **_isEnabled**, **_classes**,
No known limitations.

----------------------------
**Version number:** 2.2.0
**Version number:** 2.2.1
**Framework versions supported:** 2.0.4
**Author / maintainer:** DeltaNet with [contributors](https://github.com/deltanet/adapt-icon-popup/graphs/contributors)
**Accessibility support:** Yes
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-icon-popup",
"version": "2.2.0",
"version": "2.2.1",
"framework": "^2.0.4",
"homepage": "https://github.com/deltanet/adapt-icon-popup",
"issues": "https://github.com/deltanet/adapt-icon-popup/issues",
Expand Down
6 changes: 2 additions & 4 deletions js/adapt-icon-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ define(function(require) {

alignItems: function() {
// Check for audio toggle button
if (!$('.'+this.elementId).find('.audio-toggle').length) return;

if ($('.'+this.elementId).find('.audio-toggle').css('display') != 'none') {
if ($('.'+this.elementId).find('.audio-toggle').length && $('.'+this.elementId).find('.audio-toggle').css('display') != 'none') {
this.$('.icon-popup-inner').addClass("audio-enabled");
} else {
this.$('.icon-popup-inner').removeClass("audio-enabled");
Expand All @@ -47,7 +45,7 @@ define(function(require) {
direction = "left";
}
// Set width for padding on the title or body
var width = this.$('.icon-popup-items').width();
var width = this.$('.icon-popup-items').width() + 5;

// Set padding on title or body
if (this.model.get('displayTitle') == "") {
Expand Down

0 comments on commit 02b2c35

Please sign in to comment.