new lightbox interface v1
This commit is contained in:
@@ -275,13 +275,15 @@
|
||||
|
||||
|
||||
// Position Lightbox
|
||||
var top = $window.scrollTop() + this.options.positionFromTop;
|
||||
var left = $window.scrollLeft();
|
||||
this.$lightbox.css({
|
||||
//ADDED-START
|
||||
//var top = $window.scrollTop() + this.options.positionFromTop;
|
||||
//var left = $window.scrollLeft();
|
||||
this.$lightbox/*.css({
|
||||
top: top + 'px',
|
||||
left: left + 'px'
|
||||
}).fadeIn(this.options.fadeDuration);
|
||||
|
||||
})*/.fadeIn(this.options.fadeDuration);
|
||||
//ADDED-END
|
||||
|
||||
// Disable scrolling of the page while open
|
||||
if (this.options.disableScrolling) {
|
||||
$('body').addClass('lb-disable-scrolling');
|
||||
@@ -398,9 +400,13 @@
|
||||
|
||||
// Calculate the max image dimensions for the current viewport.
|
||||
// Take into account the border around the image and an additional 10px gutter on each side.
|
||||
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
|
||||
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop - 70;
|
||||
|
||||
//ADDED-START
|
||||
//maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
|
||||
//maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop - 70;
|
||||
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - self.$lightbox.find('.lb-dataContainer').outerWidth();
|
||||
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop;
|
||||
//ADDED-END
|
||||
|
||||
/*
|
||||
SVGs that don't have width and height attributes specified are reporting width and height
|
||||
values of 0 in Firefox 47 and IE11 on Windows. To fix, we set the width and height to the max
|
||||
@@ -496,7 +502,10 @@
|
||||
//ADDED-END
|
||||
|
||||
function postResize() {
|
||||
self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
//ADDED-START
|
||||
//self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
self.$lightbox.height(newHeight);
|
||||
//ADDED-END
|
||||
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
||||
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
||||
|
||||
@@ -589,7 +598,10 @@
|
||||
|
||||
if (this.album.length > 1 && this.options.showImageNumberLabel) {
|
||||
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
|
||||
this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
||||
//ADDED-START
|
||||
//this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
||||
this.$lightbox.find('.lb-number').empty().append(labelText).fadeIn('fast');
|
||||
//ADDED-END
|
||||
} else {
|
||||
this.$lightbox.find('.lb-number').hide();
|
||||
}
|
||||
|
||||
@@ -96,8 +96,9 @@ function Spot(asGlobals)
|
||||
};
|
||||
|
||||
this.lang = function(sKey, asParams) {
|
||||
asParams = asParams || [];
|
||||
if($.type(asParams) != 'array') asParams = [asParams];
|
||||
var sParamType = $.type(asParams);
|
||||
if(sParamType == 'undefined') asParams = [];
|
||||
else if($.type(asParams) != 'array') asParams = [asParams];
|
||||
var sLang = '';
|
||||
|
||||
if(sKey in self.consts.lang) {
|
||||
|
||||
Reference in New Issue
Block a user