Scaling bugs in HTML5 viewer

  • Klaus -- I'm encountering scaling issues in the HTML5 viewer. There are significant differences between Flash and HTML5:

    The smaller examples have a scale of 0.5 applied to the parent div. Scalechildren is true. Problems:

    1) Border width (bgborder) does not scale
    2) Border curved corners (bgroundedge) does not scale
    3) Textfield text size does not scale

  • Klaus -- I put up a demo here: Scaling demo

    Click "TOGGLE" to toggle scale between 1 and 0.5.

    Something else I just noticed. In HTML5 the textfield repositions horizontally with it's left edge as if the textfield had been scaled instead of keeping it actually centered. If I give it an absolute width the field scales properly but not the text.

    BTW, my current workaround for scaling the textfield text is to compute the scaled font-size then update the field's CSS with the new size. I wonder if zoom: -moz-transform: would work. Actually I know it works for scaling but am not sure how functionality is affected by the iOS zoom bug.

    Another thing I see in this demo: bgroundedge seems to scale correctly but it didn't in my more complete coding. Hmmm.
    See update in next message.

    XML code:

    Code
    <krpano>
    
    
    	See updated code in next message.
    
    
    </krpano>
  • Figured it out. bgroundedge scaling works fine for the topmost parent. It doesn't work for children. I have updated the demo to better show this. The updated code is below:

  • Hi,

    this a known design issue/limitation and not a simple bug. In HTML5 the children scaling currently works by sending the resulting size to the children elements, but not by applying a overall scaling like in Flash. The plugin onresize interface currently doesn't have the possibility to track scaling factors from parent elements.

    This has technical/compatibility and also design reasons, but I'm planing and working on improvements here of course.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!