Welcome to TalkGraphics.com
Results 1 to 3 of 3
  1. #1

    Default How does Scale to Fit Width work?

    I've been using Scale to Fit Width in export and it adds some code along these lines:
    <style id="xr_scstrchs">.xr_scstrch{width:100%;left:0%;z-index:-1;}</style>
    <script>xr_fitwidth=1280;xr_fws=1.50</script>

    It works but when the page loads on mobile it takes a beat to readjust to the viewport size.
    That's fine, I just wonder if someone knows more in depth what is happening.
    Maybe it can be tweaked for a smoother scaling transition?
    Thanks

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,747

    Default Re: How does Scale to Fit Width work?

    The Main and Variants are all in the same HTML file.

    A rendered page is in a state where all the assets have been fetched.
    It is all sequential so if the images load first and then the script to scale you will get this delay.

    The trick is to load lean.
    Lazy-loading is useful but hard to implement in Xara.
    Avoid use or lots of carousels; they are a distraction.
    Regular shapes without too many gradients will be rendered in the newer XDA as in-line SVGs. This makes page loading whizzy.

    My approach is to have a mostly text-based Home page and code to download all the site's images while the viewer is still reading.
    A jump to a new page will render far more quickly as its images are already there and waiting.

    The alternative is not to have a Variant but separate out Main and Variants and use code to jump between presentations, page by page.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3

    Default Re: How does Scale to Fit Width work?

    OK thanks Acorn -
    those are some good suggestions, especially " load lean"!
    I'll try some things...

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •