Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightbox v3 #711

Merged
merged 16 commits into from
Nov 4, 2024
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
Loading