Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-23761

Setting width of image component, which makes the content to be scaled, produce the wrong computation of height

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.0 (Release)
    • None
    • mx: Image
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Load image to image component and set the width to be smaller than dimensions of content.
      2. The height will be measured as if the image wasnt scaled.

      I think that problem is in SWFLoader.
      ...
      if (isContentLoaded)

      { var oldScaleX:Number = contentHolder.scaleX; var oldScaleY:Number = contentHolder.scaleY; contentHolder.scaleX = 1.0; contentHolder.scaleY = 1.0; // We should compute with oldScale properties measuredWidth = contentHolderWidth; // Should be: measuredWidth = contentHolderWidth * oldScaleX; measuredHeight = contentHolderHeight; // Should be: measuredHeight = contentHolderHeight * oldScaleY; contentHolder.scaleX = oldScaleX; contentHolder.scaleY = oldScaleY; }

      ...
      And at the end of doScaleContent there should be another measure() call to recompute the width and height.
      But maybe this is not the right solution.

      Workaround (if any):
      Manual computation of height in EVENT_COMPLETE handler.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: