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

[FCLayout] ILayoutElement.getMinBoundsWidth() doesn't return the correct measured width if item has explicit width and height.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • Adobe Flex SDK Previous
    • None
    • Spark: Layout
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile and run the following app

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">

      <fx:Script>
      <![CDATA[
      protected function button1_clickHandler(event:MouseEvent):void

      { result.text = button1.getMinBoundsWidth(false) + "," + button2.getMinBoundsWidth(false) + "," + button3.getMinBoundsWidth(false) + "," + button4.getMinBoundsWidth(false); }

      ]]
      >
      </fx:Script>

      <s:Button id="button1" x="100" y="100"/>
      <s:Button id="button2" x="100" y="200" width="50"/>
      <s:Button id="button3" x="100" y="300" height="50"/>
      <s:Button id="button4" x="100" y="400" width="50" height="50"/>

      <s:Button x="390" y="49" label="getMinBoundsWidth" click="button1_clickHandler(event)"/>
      <s:TextArea id="result" x="383" y="112" width="242" height="197"/>
      </s:Application>

      2. Click the button labelled "getMinBoundsWidth"

      Actual Results: getMinBoundsWidth() returns 21 for button1, button2, and button3, but returns 0 for button4.

      Expected Results:getMinBoundsWidth() returns the same value for all 4 buttons

      This bug affects Catalyst, which uses getMinBoundsWidth() when resizing objects, or when applying/removing constraints. This is the cause of bug TH-11616.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: