2 Replies Latest reply: Sep 25, 2014 10:22 AM by TLCMediaDesign RSS

    Captivate 8 scalable content max height/width

    xswqazi09 Community Member

      Hello,

       

      I'm using Captivate 8 and using the scalable settings, however I only want the screen to downscale from set screen size as when the screen is enlarged past it's original size everything gets really blurry. Is there anyway to set a maximum height or width within captivate or by changing the code in css/js/html files?

       

      Help is much appreciated! Thanks

        • 1. Re: Captivate 8 scalable content max height/width
          piasek123456 Community Member

          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 Community Member

            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>