Bug of scrollbar with "scale to fit" script

Hi,
I encounter a sort of bug with this nice script "scale to fit":
http://sarahjustine.com/2013/04/08/create-scale-to-fit-projects-with-adobe-edge-animate/
I create a simple animation composed of a single image (stage = 1024px X 3000px) with the script (see below) to test it: everything works, the animation is well scaled, BUT when I resize the browser, the scrollbar keeps his original size even if the height of the animation is very low.
The bug concerns all the popular browsers (desktop and mobile* version) except chrome.
* I use this meta: <meta name="viewport" content="width=device-width;">
exemple:
original height of the animation = 3000px
height of the scrollbar = 3000px
height of the animation scaled = 600px
height of the scrollbar don't change = 3000px
I don't use any CSS, I simply publish the animation with EDGE CC (not 1.5).
Someone could give me some hints for resolve this "bug" ?
Oliver.
sorry for my English, I'm French...
A live example which seems to use this script (not of me),
you can see the scrollbar bug if you resize the browser (with IE or Firefox)
http://www.ryanterry.net/resume/html5/
- - - - - - - the script (on.compositon.ready) - - - - - - -
var stageHeight = sym.$('Stage').height(); // Set a variable for the height of the stage
sym.$("#Stage").css({ // Set the transform origin so we always scale to the top left corner of the stage
"transform-origin":"0 0",
"-ms-transform-origin":"0 0",
"-webkit-transform-origin":"0 0",
"-moz-transform-origin":"0 0",
"-o-transform-origin":"0 0"
function scaleStage() {
    var stage = sym.$('Stage'); // Set a reusable variable to reference the stage
    var parent = sym.$('Stage').parent(); // Set a reusable variable to reference the parent container of the stage
    var parentWidth = stage.parent().width(); // Get the parent of the stage width
    var stageWidth = stage.width(); // Get the stage width
    var desiredWidth = Math.round(parentWidth * 1); // Set the new width of the stage as it scales
    var rescale = (desiredWidth / stageWidth); // Set a variable to calculate the new width of the stage as it scales
// Rescale the stage!
           stage.css('transform', 'scale(' + rescale + ')');
    stage.css(  '-o-transform', 'scale(' + rescale + ')');
           stage.css('-ms-transform', 'scale(' + rescale + ')');
    stage.css('-webkit-transform', 'scale(' + rescale + ')');
           stage.css('-moz-transform', 'scale(' + rescale + ')');
    stage.css('-o-transform', 'scale(' + rescale + ')');
    parent.height(stageHeight * rescale); // Reset the height of the parent container so the objects below it will reflow as the height adjusts
// Make it happen when the browser resizes
$(window).on('resize', function(){
           scaleStage();
// Make it happen when the page first loads
$(document).ready(function(){
    scaleStage();

Hey Oliver,
Try wrapping another div around the #Stage div. I believe the scrollbars are appearing because with the script Animate will recalc the parent height, BUT if that parent is the body it doesn't adjust so it thinks it's the original height of your composition. So your HTML page will look like this:
<div style="height:1px; overflow:hidden;">
    <div id="Stage" class="EDGE-78729757">
          </div></div>
I found I had to apply the height property to get it to hide the scrollbar, but the value is irrevelant as it gets overwritten anyways by the script. Give that a shot.
Good luck!
Sarah

Similar Messages

  • Edge Suite issue with Scale to Fit composition

    Having problem with this WordPress based site. As you can see, the composition is not appearing. It used to be, but then I tried Sarah Hunt's tutorial on Scale to Fit comps. The tutorial seems to work fine....except on WordPress sites. At least using the Edge Suite plugin to upload .oam's. It's mentioned in Sarah's tutorial but there was never a resolution. So I brought it over here to the main Adobe Forums and hopefully I can get an answer as to why my comp isn't displaying.
    The files for this preso are here: https://www.dropbox.com/s/v6w8x0zl0cln5wi/flowshot.zip
    Any help on making this work, er, uh, fit, would be great.

    Tried that as well, to no effect. Now I get no Edge comp on the page at all. Just blank. Although the code says otherwise
    <div id="featured" class="grid col-940">
    <div style="width:1px; height:auto"><div id="Stage" class="EDGE-6453776">
    <script type="text/javascript">window.AdobeEdge = window.AdobeEdge || {};window.AdobeEdge.pathPrefix = window.AdobeEdge.pathPrefix || {};AdobeEdge.pathPrefix.libs = 'http://flowcommunications.com/wp-content/uploads/edge_suite';AdobeEdge.pathPrefix.comps = AdobeEdge.pathPrefix.comps || {};AdobeEdge.pathPrefix.comps['EDGE-6453776'] = 'http://flowcommunications.com/wp-content/uploads/edge_suite/project/flowshot_5';</script>
    <script type="text/javascript" src="http://flowcommunications.com/wp-content/plugins/edge-suite/includes/edge-wordpress.js"></script>
    <script type="text/javascript" src="http://flowcommunications.com/wp-content/uploads/edge_suite/project/flowshot_5/flowshot_ed gePreload.js"></script>
    <div id="Stage_flowshot_5" style="height:200px;width:960px;margin: 0px auto;margin-top:10px;" class="EDGE-6453776"></div>
    </div></div>
    <p style="color: #FFF; font-family: "myriad-pro",sans-serif;"><strong>Hello! Welcome to our new site, on a new server.<br>Pardon our dust. It’s still under construction.<br>Thank you!</strong></p>
    </div><!-- end of #featured -->

  • Excel file won't scale to fit page

    We have just installed a new copier, a Ricoh MP C4503, that repaced essentially an earlier version of the product.
    We have a user with an Excel for Mac 2011 xls file, that when he selected an area and printed with scale to fit, printed full page on 11 x 17. But now the spreadhseet comes out looking shrunk on the page, perhaps as thought it would look if printed fully on 8.5 x 11 but I'm just guessing.
    If I print this file on another Mac,with essentially the same OS (or several other versions of OSX on several other Macs we have in the office) using the same copier, it prints as desired, a beautiful fullpage 11x17 spreadsheet.
    It is only on his MBP (with latest updates I might add) that this problem is occurring, so I think it must be a problem with his OS, his printer driver, or his Excel installation, and I would remind, it printed fine before the new printer/copier came along.
    I have tried a barrage of possible solutions until I'm bleary-eyed: multiple tweaks of the settings in sys prefs, printer features, page setup, print area, deleting and reinstalling driver, and more.
    Help?

    Wrong place to ask perhaps?

  • Web Content: Scale to Fit

    Any suggestions as to why a web content url to Twitter Feed that formerly worked with Scale to Fit would stop working after a rebuild in v25?

    Same problem here.
    I create a 768x1024 Edge animation to be used in the vertical rendition of the article. Then I create a proportionally scaled down frame in the horizontal rendition using the "Scale Content to Fit" and link to the 768x1024 published Edge content. It should work, right? But it doesn't. My content is much smaller than the frame and there remaining 20% or so space inside the frame is a shade of grey...
    I'm going to see if I can somehow fix this by opening the file in Dreamweaver, but I really should have to do so if it works fine in the 768x1024 frame.
    Is there something obvious that we're overlooking?
    Thanks!

  • Scale to fit not working in Ppro cs3

    I have an issue with scale to fit of export settings in Premier Pro CS3. I need to eliminate the black bars on the side of clips. I check the scale to fit of the output box but it will not do the job. I have to manually play around with pixels numbers in order to get rid of the black bars. Is this normal or am I missing something?

    I have a semi-related question. I'm using CS4.  Does scale to fit reduce the image quality? It seems like it does.
    I shot P2 HDV footage in the widescreen ratio (shot 24p 720p HVX-200), but my intention was to present a 1.33 image aspect ratio (not to be confused with the HDV pixel aspect ratio) even on the 16x9 displays, in other words pillarboxed.
    This output was successful using crop tool in Media Encoder, but on 4x3 TVs, I want to present a fullscreen image. I output with Media Encoder, select 4x3, and I crop the same way, and then I choose "scale to fit". However, this reduces the image quality.
    Is there any other way I can take 16x9 1.78 footage and crop it in Premiere Pro, or Encore, or Media Encoder to create a full-quality 4x3 image that is fullscreen on 4x3 TVs?  (Note: I definitely don't want a letterboxed and pillarboxed result on 4x3 TVs, i.e. windowboxed).
    I tried opening new Premiere Pro projects with different settings, and tried using "interpret footage" to fool it, but I couldn't hit on the magical combination to create a 4x3 cropped project (or Pan&Scan you might say) in Premiere Pro. Are there some Pan and Scan tools in Premiere Pro that can do this?
    I found some help here. It says: "This techniques is called pan & scan. In Adobe Premiere Pro, you can implement either technique by using Motion effect properties such as Position and Scale."  But what the heck would I do? Open a 4x3 standard def project and then import the HDV P2 footage and use position and scale there?  Cropping it in an appropriately opened DVCPROHD project has a 16x9 image area to start with...
    Any help?

  • How can I print a full frame photo from iPhoto 11?  Even though I click on scale to fit paper size, it crops both ends of the photo in landscape set up.  I have an Epson R1800 with the latest drivers.

    How can I print a full frame photo from iPhoto 11?  Even though I click on scale to fit paper size, it crops both ends of the photo in landscape set up.  I have an Epson R1800 with the latest drivers. (I'm also 3 days new to iMac and iPhoto 11 from an eMac and iPhoto 6.)

    " Hello Jeff. Here at Oki Data, we do not support programming.  I would recommend contacting Adobe for further assistance. You can also browse their website at http://www.adobe.com/products/postscript/.

  • Scale-to-fit with sticky menu

    Hey everybody,
    I have used Sara's scale-to-fit code, works perfectly.
    There are two things though that I just can't get around.
    I have created a sticky menu, that sticks to the top after a certain amount of scrolling.
    using, $("body").append(sym.$('Menu')) and position:fixed, top:0px and all that.
    This works great too, until I resize my window.  It doesn't go along with the scaling of the stage, stays in it's original size.
    I'm gussing the append is what is causing this.
    Tried adding some css to control the menu's size on the scroll function, but that doesn't seem to work either.
    Besides that, the code that is supposed to scale the height of the stage,
    parent.height(stageHeight * rescale);
    only seems to be working on Chrome. On Firefox and ItE, when I resize my window, the stage's height remains in it's original, creaing a very long empty scroll on the end of the page.
    Any suggestions?
    Hope that made sense,
    Thank you thank thank you!

    Hey Yuval,
    Glad you found the tutorial useful!
    This is because the code targets the #Stage div, not the body which is where your menu is appended to.
    Trying $("#Stage").append(sym.$('Menu')) might do the trick. Give that a shot.
    Sarah

  • How to scale to fit Photoshop CS6

    I work with a lot of texture layers, often the wrong size and dimensions. I do transform and manually resize. But is there a scale to fit command?In the Photoshop Paper Texture extension, you can see it does that automatically. If there isn't such a command, can anyone point me to an action I can use.
    Thank you.
    Max

    No guessing needed of course there is. Layers are as easy to resize as documents is.  That is what "Transform" does in a script though its method name in script is resize. The resize values used are relative to current size percentage the anchor point defaults to the center but can be changed and the interpolation use is you interpolation preference which can be changed.
    Javascript syntax
    resize ([horizontal] [, vertical][, anchor]); // number number AnchorPosition
    Resizes the layer to the specified dimensions (as a percentage of its current size) and places it in the specified position.
    Here is a sample of how one might use it. You need to be careful if you have CS6 Adobe failed to update Photoshop scripting to support BicubicAutomatic and if you leave Adobe default interpolation preference set script will encounter a Photoshop internal error when you try to save that setting.
    // Save interpolation settings the script will fail if CS6 and setting is bicubic automatic
    var userResampleMethod = app.preferences.interpolation;
    app.preferences.interpolation = ResampleMethod.BICUBIC; // resample interpolation bicubic
    if (LWidth/LHeight<SWidth/SHeight) { // Smart Object layer Aspect Ratio less the Canvas area Aspect Ratio
       var percentageChange = ((SWidth/LWidth)*100); // Resize to canvas area width
       activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLECENTER);
    else {
       var percentageChange = ((SHeight/LHeight)*100); // resize to canvas area height
       activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLECENTER);
    app.preferences.interpolation = userResampleMethod; // Reset interpolation setting
    Message was edited by: JJMack

  • How do I Configure Desktop Printer to scale to fit?

    I love the feature of drag and drop printing and I often need to print many pdfs. However when I drag pdfs to the desktop printer icon it prints them on letter sized paper without scaling them to fit. I have configured the printer in the setup utility to print on tabloid but it still prints on letter with no scaling. How can I configure the desktop printer to scale to fit and select paper size? booya

    Hi Daniel, and a warm welcome to the forums!
    Doesn't your printer have a setting for the default size in it rather than just on the Mac?
    What size are these in the first place?
    I think the secret is to save the Tabloid size as a Default, but I don't have a Tabloid to test with, so I used Preview, (which you may end up having to use to drop on or Script to, dunno yet).
    I made a new Page size of Tabloid...
    Then saved as default...
    You'll have to test this... not even sure it works to Scale to Size, but at least you could drop them on Preview then +p to see.

  • SCCM Remote Control - Set default to not "scale to fit"

    We are using SCCM Remote Control Viewer (CmRcViewer.exe).
    By default the view is set to "scale to fit" (with a tick) for every computer you connect to. If you change it to unticked it then reverts back for the next computer you connect to. Is there a way to set the default not to be scale to fit (unticked)?
    I have looked through the registry but can't see anything obvious.
    Thanks!

    Sounds like a good DCR though which you can file on Connect (connect.microsoft.com) -- anything you file there goes directly into the product team's bug database. That doesn't mean it will get fixed, just that someone will review it and the more justification
    you can add, the more likely it will be considered to be addressed in the future.
    Jason | http://blog.configmgrftw.com

  • How to print with "Scale: 100%" by default from Preview

    The print dialogue in Preview is set by default to "Scale to Fit".
    I never need this, I always need "Scale: 100%".
    It's annoying to change all the time I have to print a PDF from Preview the setting!
    I tried to save the print setting, but it does not work.
    So. Is there a way to set the print dialogue by default to "Scale: 100%" ?
    Mayby with a Terminal command?

    AFAICT, only for PDF files. If you want to report this issue to Apple's engineering, send a bug report or an enhancement request via its Bug Reporter system. To do this, join the Mac Developer Program—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report or enhancement request. The nice thing with this procedure is that you get a response and a follow-up number; thus, starting a dialog with engineering.

  • Report generation doesn't scale to fit

    The layout option, "Scale front panel to fit" in "Easy Print VI Panel or Documentation.vi" (in the report generation pallette) doesn't do anything.  In fact, if I dig into that vi, it goes through to "Report Gen VI or Documentation.vi", and I find that the  layout option isn't wired to anything!  Is this a known problem with that vi?
    My application requires that I print the front panel as part of a user log, and I need to be able to scale to fit in order to squeeze it onto the page.  Any suggestions?
    Thanks,
    Charlie

    Hi Charlie,
    The layout option is not wired to anything in the Standard, HTML, Excel and Word Report, but it is used in the Quick Print default case.  The Help document for this VI mentions that the layout option is ignored on Standard and HTML Reports but does not mention the Excel or Word Reports.
    This was discovered a little while ago in this discussion forum.  And a report has be filed to R&D by Ben.
    Justin Parker
    National Instruments
    Product Support Engineer

  • Feature request: Scale to fit (Smart Scale)

    Hello,
    When I either drag a layer from one doc to another, when I drop it, or even via copy and paste, it would be nice to have a SCALE TO FIT option.
    Often when working with different resolution images, you still need to make them fit. Either scaling down to fit target document size, or scale up. Kind of like a Super Smart Object.
    If you have different ratios, i.e 4:3, 16:9 etc. you can have option to either scale to fit width, or height. or simply scale to fit 100% in the canvas.
    Very much like we have in most print dialog boxes.
    It could be a keyboard comand or even contextual menu: SCALE TO FIT.
    A selected object or layer can be right clicked: scale to fit. Would help workflow. Would be easy to impliment.
    Option: Constrain Proportions check box. example, if I am bringing in say a texture I want to use with blend modes. this option would scale the X and Y to fit the canvas.
    Thank you!

    See http://developer.mozilla.org/en/Places_query_URIs

  • Are Adobe EVER going to make Edge Animate scale-to-fit (like Flash)?

    I've been following the progress of Edge Animate (formerly Edge) ever since Steve Jobs decided he wasn't having Flash on the iPad.
    With each new version I've been desperately looking for the feature that I consider the most important of all: Scale-to-fit
    There are a couple of discussions already on this forum where people have requested this feature - but both have been sidetracked by replies from people who haven't understood what 'scale-to-fit' is. So let me explain Scale-to-fit:
    I'm talking about the feature in Flash - where if the HTML dimensions are set to 'Percent' - then the resultant movie will scale-to-fit any browser window. Here is an example of what I mean:
    http://www.skippingschool.co.uk
    - try changing the browser size and you'll see the whole frame (graphics and images) scales without changing its proportions.
    When the latest version of Edge Animate came out with its built-in easy-to-follow 'Resize' Lesson, I thought Adobe had finally found an answer. But good though this feature is, it doesn't solve the problem. It's only possible to properly scale-to-fit images - not graphics.
    It's now more important than ever that Adobe finds a solution to this problem. The world is going 'Responsive' - its not just a fad. And 'Responsive' is not just about three columns being squeezed into one. All Responsive sites require images, graphics AND animations to scale-to-fit. So Adobe's tutorial showing how Edge Animate can be added to WordPress sites is of limited use because it won't work for Responsive web sites.
    So please Adobe, will someone tell me if scale-to-fit is EVER going to happen? I don't mind if it's 3 months, 6 months, 9 months down the line - but I need to know if it's worth me sticking with Edge Animate - or whether I should be looking toward HTML5 Canvas or something else for a solution?
    Alternatively, is there some fundamental reason why it can NEVER happen?
    Please tell me? Just put me out of my misery!

    Hi Sarah,
    I hope you don't mind but I played around with your code a bit and managed to get the kind of scale-to-fit behavior that I believe the OP was asking about.  I think the trick is to make sure that you also check whether the scaled height of the stage exceeds the height of the browser window and change the scaling so that it is responsive to changes in both the width and height of the window, whichever is the limiting factor. The code I changed in CompositionReady appears in bold below.  I hope this helps.
    sym.$("#Stage").css({ // Set the transform origin so we always scale to the top left corner of the stage
    "transform-origin":"0 0",
    "-ms-transform-origin":"0 0",
    "-webkit-transform-origin":"0 0",
    "-moz-transform-origin":"0 0",
    "-o-transform-origin":"0 0"
    function scaleStage() {
        var stage = sym.$('Stage'); // Set a reusable variable to reference the stage
        var parent = sym.$('Stage').parent(); // Set a reusable variable to reference the parent container of the stage
        var parentWidth = stage.parent().width(); // Get the parent of the stage width
        var parentHeight = $(window).height(); // Get the browser window height
        var stageWidth = stage.width(); // Get the stage width
        var stageHeight = stage.height(); // Get the stage height
        var desiredWidth = Math.round(parentWidth * 1); // Set the new width of the stage as it scales
        var desiredHeight = Math.round(parentHeight * 1); // Set the new height of the stage as it scales
        var rescaleWidth = (desiredWidth / stageWidth); // Set a variable to calculate the new width of the stage as it scales
        var rescaleHeight = (desiredHeight / stageHeight); // Set a variable to calculate the new height of the stage as it scales
        var rescale = rescaleWidth;
        if (stageHeight * rescale > desiredHeight) // Do not scale larger than the height of the browser window
                        rescale = rescaleHeight;
    // Rescale the stage!
               stage.css('transform', 'scale(' + rescale + ')');
         stage.css(  '-o-transform', 'scale(' + rescale + ')');
               stage.css('-ms-transform', 'scale(' + rescale + ')');
         stage.css('-webkit-transform', 'scale(' + rescale + ')');
               stage.css('-moz-transform', 'scale(' + rescale + ')');
         stage.css('-o-transform', 'scale(' + rescale + ')');
               parent.height(stageHeight * rescale); // Reset the height of the parent container so the objects below it will reflow as the height adjusts
    // Make it happen when the browser resizes
    $(window).on('resize', function(){
               scaleStage();
    // Make it happen when the page first loads
    $(document).ready(function(){
        scaleStage();

  • Printing Keynote presentation-scale to fit

    is there a way to print a keynote presentation to scale to fit different paper sizes? E.g. I have a 800 x 600 presentation and I want it to print to the maximum size on a tabloid page (same for 1024x720, 1920 x 1080, custom, etc). Ideally this would be handled directly out of keynote, but changing the percentage of output under page setup has NO effect...this seems so basic, there's got to be something simple I am missing.. can anyone help?
    btw: exporting to pdf only to then print seems like an extra step and creates a duplicate file I would rather not have to keep up to date with changes...
    anyone?

    Hi
    I am having the same problem but with larger poster size slides. I have ended up making PDFs from Keynote.

Maybe you are looking for

  • Service/Maintenace Order type ZMSO not completely maintained for plant SE50

    Hi All, Am trying to create a Service Order with T.Code IW31 and after entering the order type, priority, Llyods code, Plant and Bus.Area and press enter I got error " Service/Maintenace Order type ZMSO not completely maintained for plant SE50 " Diag

  • Error: Save subscription to server

    Hi all, When I try to create an e-mail subscription, I get the following error at the end of the Create Subscription Wizard: Save Subscription   Error: Save subscription to server Errors An error occurred within the report server database.  This may

  • Logic in single statment.

    1. if p_number is null then      i have substitute 52211 value 2. if p_number is no exists in target table then      i have substitute 52211 value 3. if p_number is exists in target table then      i have take the target table value and i have do the

  • How can I install an aplication if i have formated...

    Hello! I need help and hope you can help me. Ive got an E63 cell phone, and it works cool.  The problem is, I installed on it the foursquare app from OviStore, later i had to format the sd card and now I do not see nowhere the app or this archive .si

  • Rendercrash - "ungültiger bildpuffer"

    Hi everyone, not sure this is the right location of this post here but I´m kinda stuck..so any help appreciated! Also, I´m running on german, so I´ll translate as approximately as possible.. i´m rendering a large comp. HD 1920 x 1080. Square Px. 25 f