fix picture orientation
This commit is contained in:
@@ -215,6 +215,9 @@
|
||||
alt: $link.attr('data-alt'),
|
||||
link: $link.attr('href'),
|
||||
title: $link.attr('data-title') || $link.attr('title')
|
||||
//ADDED-START
|
||||
, orientation: $link.attr('data-orientation')
|
||||
//ADDED-END
|
||||
});
|
||||
}
|
||||
|
||||
@@ -293,6 +296,14 @@
|
||||
});
|
||||
|
||||
$preloader = $(preloader);
|
||||
|
||||
//ADDED-START
|
||||
if(Math.abs(self.album[imageNumber].orientation) == 90) {
|
||||
var sWidth = preloader.width;
|
||||
preloader.width = preloader.height;
|
||||
preloader.height = sWidth;
|
||||
}
|
||||
//ADDED-END
|
||||
|
||||
$image.width(preloader.width);
|
||||
$image.height(preloader.height);
|
||||
|
||||
Reference in New Issue
Block a user