Skip to content

Commit

Permalink
Lightbox v3 (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisben authored Nov 4, 2024
1 parent e84cc50 commit 1da8a47
Show file tree
Hide file tree
Showing 26 changed files with 445 additions and 638 deletions.
12 changes: 2 additions & 10 deletions assets/js/theme/components/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ window.osuny.components = window.osuny.components || {};

window.osuny.components.events = {
components: {
lightbox: null,
carousel: null
},
handleKeyDownEvent: function (e) {
var target = this._targetDirector();

if (target) {
if (e.key === 'ArrowLeft') {
target.previous();
Expand All @@ -19,18 +19,10 @@ window.osuny.components.events = {
},
// who receives the event depending on lightbox state and carousels
_targetDirector () {
if (this._isLightBoxOpened()) {
return this.components.lightbox;
}
if (this._hasFocusedCarousel()) {
if (this._hasFocusedCarousel() && !window.osuny.lightbox.state.opened) {
return this.components.carousel.focusedCarousel;
}
},
_isLightBoxOpened () {
if (this.components.lightbox) {
return this.components.lightbox.container.opened;
}
},
_hasFocusedCarousel () {
if (this.components.carousel) {
return this.components.carousel.focusedCarousel;
Expand Down
7 changes: 0 additions & 7 deletions assets/js/theme/components/lightbox.js

This file was deleted.

23 changes: 0 additions & 23 deletions assets/js/theme/components/lightbox/classes.js

This file was deleted.

120 changes: 0 additions & 120 deletions assets/js/theme/components/lightbox/container.js

This file was deleted.

76 changes: 0 additions & 76 deletions assets/js/theme/components/lightbox/controls.js

This file was deleted.

9 changes: 0 additions & 9 deletions assets/js/theme/components/lightbox/events.js

This file was deleted.

46 changes: 0 additions & 46 deletions assets/js/theme/components/lightbox/lightbox.js

This file was deleted.

Loading

0 comments on commit 1da8a47

Please sign in to comment.