Alexandre's fit-to-width height scaling fix
This commit is contained in:
parent
086ea510c4
commit
c45e14e185
@ -862,13 +862,14 @@ function processSlideAspectTimes() {
|
||||
}
|
||||
|
||||
function processAspectValue(vboxWidth, vboxHeight, time, lastAspectValue) {
|
||||
var imageId;
|
||||
if (time == "0.0") {
|
||||
//a little hack 'cause function getImageAtTime with time = 0.0 returns the background image...
|
||||
//we need the first slide instead
|
||||
var imageId = "image1";
|
||||
imageId = "image1";
|
||||
}
|
||||
else {
|
||||
var imageId = getImageAtTime(time);
|
||||
imageId = getImageAtTime(time);
|
||||
}
|
||||
|
||||
if (imageId !== undefined) {
|
||||
@ -961,8 +962,10 @@ window.onresize = function(event) {
|
||||
var resizeSlides = function() {
|
||||
if (currentImage) {
|
||||
var $slide = $("#slide");
|
||||
var max = currentSlideAspect * $slide.parent().outerHeight();
|
||||
$slide.css("max-width", max);
|
||||
var maxWidth = currentSlideAspect * $slide.parent().outerHeight();
|
||||
$slide.css("max-width", maxWidth);
|
||||
var maxHeight = $slide.parent().width() / currentSlideAspect;
|
||||
$slide.css("max-height", maxHeight);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user