Remove dependency to lightbox2
This commit is contained in:
@@ -551,22 +551,18 @@
|
||||
|
||||
// Animate the size of the lightbox to fit the image we are showing
|
||||
// This method also shows the the image.
|
||||
//ADDED-START
|
||||
//Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
|
||||
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight, media) {
|
||||
media = media || 'image';
|
||||
//ADDED-END
|
||||
var self = this;
|
||||
|
||||
var oldWidth = this.$outerContainer.outerWidth();
|
||||
var oldHeight = this.$outerContainer.outerHeight();
|
||||
//ADDED-START
|
||||
//var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
|
||||
//var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
|
||||
var mediaBorderWidth = (media=='image')?this.imageBorderWidth:this.videoBorderWidth;
|
||||
var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + mediaBorderWidth.left + mediaBorderWidth.right;
|
||||
var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + mediaBorderWidth.top + mediaBorderWidth.bottom;
|
||||
//ADDED-END
|
||||
|
||||
function postResize() {
|
||||
if(self.$lightbox.hasClass('vertical')) self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import autosize from 'autosize';
|
||||
import mousewheel from 'jquery-mousewheel';
|
||||
import waitforimages from 'jquery.waitforimages';
|
||||
import lightbox from './lightbox.js';
|
||||
|
||||
//Simplebar
|
||||
import SimpleBar from 'simplebar';
|
||||
|
||||
Reference in New Issue
Block a user