-
1. Re: Captivate 8 scalable content max height/width
piasek123456 Sep 25, 2014 12:54 AM (in response to xswqazi09)Hi,
I ran across thesame issue, I'm using Cp6, and found the solution in modifying /assets/js/CPLibrary.js file in following way:
Line 23528 there is following function:
function SetScaleAndPosition()
Line 23576 there is following condition:
if(cp.verbose)
{
cp.log(cp.model.data.project.shc);
cp.log(cp.movie.m_scaleFactor);
cp.log(cp.shouldScale);
}
Prior to that condition from line 23576, I placed this code:
if( (cp.movie.m_scaleFactor >= 1.0))
return true;
This limits scaling to 100% only, or lower.
However, when using scalable html5 content in Cp6, I encountered problems with smart shapes buttons (they do not work), so, if what is above works for You, I would appreciate, if You could inform me, if, in Cp8, there is no problem with smart shapes buttons when using scalable html5, thanks in advance.
-
2. Re: Captivate 8 scalable content max height/width
TLCMediaDesign Sep 25, 2014 10:22 AM (in response to piasek123456)I think your problem could stem from the fact that CP still thinks it should scale. The smart objects are canvas elements that have different scale formulas and are based on the shouldScale variable and the scaleFactor which is constantly updated. Where you placed your code, it may not get called all of the time. The following will stop scaling on desktops or laptops but will allow scaling on all other devices:
Find the line:
cp.shouldScale = cp.D.project.shc;
Replace with:
if (isMobile)
{
cp.shouldScale= cp.D.project.shc;
}
else
{
cp.shouldScale= false;
}
Then add a mobile detection script in the head of the index.htm:
<script>
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )
{
var isMobile = true;
}
else
{
var isMobile = false;
}</script>

