Explore the community Forums Lectora Lectora Questions & Answers Scaling problems on the iPad Reply To: Scaling problems on the iPad

#422067 Score: 0
Profile photo of zeddicus
zeddicus
Member
beginner
intermediate
curious george
wise owl
contributor
@zeddicus

This unfortunately requires a detailed analysis of the Lectora code. From what I was able to determine, a small change in the findWH function helped a bit as I mentioned earlier. This function is on every page and looks like this:

function findWH(){ //echo LD-769
if (is.ie9) {
var vScrollAdj = (is.ns ? 16 : 20);
winW = (is.ns) ? window.innerWidth - vScrollAdj : document.body.offsetWidth;
winH = (is.ns) ? window.innerHeight : document.body.offsetHeight;
}
else if (is.ie) {
winW = Math.max(Math.max(getDisplayDocument().body.scrollWidth, getDisplayDocument().documentElement.scrollWidth)-16,
Math.max(getDisplayDocument().body.offsetWidth, getDisplayDocument().documentElement.offsetWidth)-16,
Math.max(getDisplayDocument().body.clientWidth, getDisplayDocument().documentElement.clientWidth)-16 );
winH = Math.max(Math.max(getDisplayDocument().body.scrollHeight, getDisplayDocument().documentElement.scrollHeight)-16,
Math.max(getDisplayDocument().body.offsetHeight, getDisplayDocument().documentElement.offsetHeight)-16,
Math.max(getDisplayDocument().body.clientHeight, getDisplayDocument().documentElement.clientHeight)-16 );
}
else
{
winW = getDisplayDocument().documentElement.clientWidth ? getDisplayDocument().documentElement.clientWidth : getDisplayDocument().body.clientWidth;
if(is.iOS && (navigator.userAgent.indexOf('CellCast-iPad') != -1 || navigator.userAgent.indexOf('CellCast-iPhone') != -1) )
winW = getScreenWidth();
winH = getDisplayDocument().documentElement.clientHeight ? getDisplayDocument().documentElement.clientHeight : getDisplayDocument().body.clientHeight;
}
}

The line with iOS did not execute on the iPad. That’s why I changed it a bit and it helped, but it’s still not enought in the case of the embedded course. The getScreenWidth() function is in the trivantis.js file, but I have not yet dug up to the place that needs to be improved.

  • This reply was modified 1 year, 5 months ago by Profile photo of zeddicus zeddicus .