Skip to content

Commit

Permalink
fixed not working popup window on single image (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
RostislavKreisinger authored Apr 21, 2020
1 parent 06f09d8 commit ad7a0a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/frontend/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ import './responsiveTooltip';
import './safariDetection';
import './SearchAutocomplete';
import './spinbox';
import './popup';
13 changes: 13 additions & 0 deletions assets/js/frontend/components/popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'magnific-popup';
import Register from 'framework/common/utils/Register';

export default class Popup {

static init ($container) {
$container.filterAllNodes('.js-popup-image').magnificPopup({
type: 'image'
});
}
}

new Register().registerCallback(Popup.init);

0 comments on commit ad7a0a2

Please sign in to comment.