Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
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:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function traceWidths(event:FlexEvent):void
{ // TODO Auto-generated method stub trace(this.currentState, ": rect.width =", rect.width); } ]]
>
</fx:Script>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:states>
<s:State name="defaultState"/>
<s:State name="fixedState"/>
<s:State name="percentState"/>
</s:states>
<s:Button click="this.currentState='fixedState'" label="fixedState" />
<s:Button click="this.currentState='percentState'" label="percentState" />
<s:Button click="this.currentState='defaultState'" label="defaultState" />
<s:Group width="200" updateComplete="traceWidths(event)">
<s:Rect id="rect" width="50" width.fixedState="100" width.percentState="100%" height="100">
<s:fill>
<s:SolidColor color="red" />
</s:fill>
</s:Rect>
</s:Group>
</s:Application>
2. Click on "percentState" button
3. Click on "defaultState" button
Actual Results:
When returning to defaultState, the width of the rect is now 0.
Expected Results:
The rect's width should be 50.
Workaround (if any):
Explicitly set the width in the "defaultState" state.
// OLD: For FormText
Actual Results:
When returning to defaultState, the rows that had percentage heights specified are now 0 instead of the default height value.
defaultState row1: 20, row2: 35, row3: 50, row4: 40, row5: 30, row6: 25
fixedPerState row1: 20, row2: 59, row3: 40, row4: 117, row5: 30, row6: 234
defaultState row1: 20, row2: 0, row3: 50, row4: 0, row5: 30, row6: 0
Expected Results:
When returning to defaultState, the rows should have the default height value.
defaultState row1: 20, row2: 35, row3: 50, row4: 40, row5: 30, row6: 25
fixedPerState row1: 20, row2: 59, row3: 40, row4: 117, row5: 30, row6: 234
defaultState row1: 20, row2: 35, row3: 50, row4: 40, row5: 30, row6: 25
Workaround (if any):
Set the "default" height to the "defaultState" state.