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

svn 19816 caused TileLayout virtualization failures in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 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 this application:

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark">

      <fx:Script>
      <![CDATA[
      import mx.collections.*;

      public function createVariableItems(nItems:int):ArrayList {
      var tempArray:Array = new Array(nItems);
      for (var i:int = 0; i < nItems; i++)
      tempArray[i] = (

      {myItemIndex: i, minorSize: 100, majorSize: (20 + ((20 * i) % 100))}

      );

      return new ArrayList(tempArray);
      }
      ]]
      >
      </fx:Script>

      <s:Group id="containingGroup">
      <s:Rect id="bgRect" top="0" left="0" right="0" bottom="0">
      <s:fill>
      <s:SolidColor color="0xe3e3e3" />
      </s:fill>
      </s:Rect>

      <s:DataGroup width="500" height="500" clipAndEnableScrolling="true"
      dataProvider="

      {createVariableItems(500)}

      ">
      <s:layout>
      <s:TileLayout useVirtualLayout="true" orientation="rows" />
      </s:layout>
      <s:itemRenderer>
      <fx:Component>
      <s:ItemRenderer autoDrawBackground="false"
      top="0" right="0" left="0" bottom="0">
      <fx:Script>
      <![CDATA[
      override public function set data(value:Object):void

      { super.data = value; if(value == null) return; lbl.text = data.myItemIndex; forefrontRect.width = value.majorSize; forefrontRect.height = value.minorSize; }

      ]]
      >
      </fx:Script>

      <s:states>
      <s:State name="normal"/>
      <s:State name="hovered"/>
      <s:State name="selected"/>
      </s:states>

      <s:Rect id="bgRect" top="0" left="0" right="0" bottom="0">
      <s:fill>
      <s:SolidColor color="0xCCCCCC" />
      </s:fill>
      </s:Rect>

      <s:Rect id="forefrontRect">
      <s:fill>
      <s:SolidColor color="0xA8C6EE"
      color.hovered="0xCEDBEF"
      color.selected="0xCCCCCC" />
      </s:fill>
      </s:Rect>

      <s:Label id="lbl" top="1" left="1" />
      </s:ItemRenderer>
      </fx:Component>
      </s:itemRenderer>
      </s:DataGroup>

      </s:Group>

      </s:Application>

      2.
      3.

      Actual Results:

      All the renderers look the same except the gap in the first one. Hovering over the renderers is weird too, some seem to stick out under others.

      Expected Results:

      See the baseline and bad png attached that show how this used to look

      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: