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

Children in container with VerticalLayout & horizontalAlign = justify, size to largest child width not container width

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: VerticalLayout
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile & run:
      <?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" xmlns:local="Assets.*"
      width="500" height="500">

      <s:Panel id="pnl" height="100" width="100" >
      <s:layout>
      <s:VerticalLayout horizontalAlign="justify"/>
      </s:layout>

      <s:Rect width="150" height="50">
      <s:fill>
      <s:SolidColor color="0xFF0000"/>
      </s:fill>
      </s:Rect>

      <s:SimpleText width="100" height="50" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis nisi. Duis at turpis. Sed hendrerit porttitor est. Ut et eros. Nullam risus lacus, semper ut, gravida vitae, tempus ac, ligula. Nulla mollis. Curabitur neque nibh, pretium quis, hendrerit sit amet, molestie non, sem. Pellentesque quis arcu quis odio">
      </s:SimpleText>
      </s:Panel>
      </s:Application>

      Actual Results:
      Notice the children are sized to the largest child width 150 instead of the container width of 100.

      Expected Results:
      Based on the documentation, horizontalAlign=justify should "Justify the children with respect to the container. This uniformly sizes all children to be the same width as the container. "
      Either the documentation is incorrect, or the children should be justified to a width of 100.

      Workaround (if any):

      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: