royale-asjs icon indicating copy to clipboard operation
royale-asjs copied to clipboard

Height 100% - Child Resize Inconsistent Behavior

Open yishayw opened this issue 4 years ago • 5 comments

In this app

<?xml version="1.0" encoding="utf-8"?>
<s:Application 
	xmlns:fx="http://ns.adobe.com/mxml/2009"
	xmlns:s="library://ns.apache.org/royale/spark"
	creationComplete="init()"
	>
	<fx:Script>
		<![CDATA[
			private function init():void
			{
				myContent.height = 200;
				myContent.width = 200;
			}

		]]>
	</fx:Script>		
	<s:Group id="upperContainer">
		<s:Group id="bottomContainer" width="100%">
			<s:BorderContainer backgroundColor="blue" id="myContent"/>
		</s:Group>
	</s:Group>
</s:Application>

bottomContainer height will remain 0. But if I initialize myContent with the values given in init() then it's height will be 200. It should not matter if height of myContent was given after creationComplete, or before.

yishayw avatar Dec 09 '20 19:12 yishayw

This is the ChildResize branch.

yishayw avatar Dec 09 '20 20:12 yishayw

Seems to work ok for me.

aharui avatar Dec 10 '20 05:12 aharui

This seems to be fixed, at least with PR #1135 and other previous PRs (don't know which one fixed it; I guess ChildResize branch did). This shows a blue square 200x200, and DOM attributes show bottomContainer has height 200, when the width/height are set in creationComplete.

estanglerbm avatar Jul 25 '21 11:07 estanglerbm

I can confirm it works in ChildResize as well. Will ChildResize or PR #1135 is merged.

yishayw avatar Oct 18 '21 11:10 yishayw

Works in develop, already.

estanglerbm avatar Oct 19 '21 08:10 estanglerbm