Merge 6413e664b1
into 48a8e6c669
commit
cee4446faa
|
@ -946,11 +946,14 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
if ($intro.length) {
|
if ($intro.length) {
|
||||||
var bgImg = params.introPage.backgroundImage;
|
var bgImg = params.introPage.backgroundImage;
|
||||||
var bgImgRatio = (bgImg.height / bgImg.width);
|
var bgImgRatio = (bgImg.height / bgImg.width);
|
||||||
$intro.css({
|
|
||||||
background: '#fff url("' + H5P.getPath(bgImg.path, contentId) + '") no-repeat 50% 50%',
|
setTimeout(function () {
|
||||||
backgroundSize: 'auto 100%',
|
$intro.css({
|
||||||
minHeight: bgImgRatio * +window.getComputedStyle($intro[0]).width.replace('px','')
|
background: '#fff url("' + H5P.getPath(bgImg.path, contentId) + '") no-repeat 50% 50%',
|
||||||
});
|
backgroundSize: 'auto 100%',
|
||||||
|
minHeight: bgImgRatio * +window.getComputedStyle($intro[0]).width.replace('px','')
|
||||||
|
});
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue