Add project local functions to main spot class
This commit is contained in:
@@ -372,7 +372,7 @@
|
||||
return {maxWidth: iMaxMediaWidth, maxHeight: iMaxMediaHeight, direction: sDirection};
|
||||
};
|
||||
|
||||
updateHash('media', self.album[imageNumber].id);
|
||||
oSpot.updateHash('media', self.album[imageNumber].id);
|
||||
|
||||
if(self.options.hasVideo) {
|
||||
var $lbContainer = this.$lightbox.find('.lb-container');
|
||||
@@ -585,7 +585,10 @@
|
||||
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
||||
|
||||
// Set focus on one of the two root nodes so keyboard events are captured.
|
||||
self.$overlay.focus();
|
||||
//ADDED-START
|
||||
//self.$overlay.focus();
|
||||
self.$overlay.trigger( 'focus' );
|
||||
//ADDED-END
|
||||
|
||||
self.showImage();
|
||||
}
|
||||
@@ -704,6 +707,9 @@
|
||||
};
|
||||
|
||||
Lightbox.prototype.enableKeyboardNav = function() {
|
||||
//ADDED-START
|
||||
this.disableKeyboardNav();
|
||||
//ADDED-END
|
||||
this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
};
|
||||
@@ -750,7 +756,7 @@
|
||||
|
||||
if($hasVideoNav) $lbContainer.removeClass('lb-video-nav');
|
||||
}
|
||||
flushHash();
|
||||
oSpot.flushHash();
|
||||
//ADDED-END
|
||||
|
||||
$(window).off('resize', this.sizeOverlay);
|
||||
|
||||
Reference in New Issue
Block a user