On 12/11/19, 9:56 PM, "Piotr Zarzycki" <[email protected]> wrote:

    Hi Alex,
    
    Well non of those events were launched
    widthChanged/heightChanged/sizeChanged - cause simply I didn't set any
    explicit sizes on a component/parent etc, so there wasn't any kind of place
    where I could reach out and have the solution.
    
Reading your earlier email again, it seems like style.visibility was set to 
false.  That could definitely mess up the initialization.  Then the question 
would be why was style.visibility false.  If components are being created as 
invisible, it could be that the component needs to detect changes from 
visible=false to visible=true and force a layoutNeeded event.

Or if the component is sized to content, then It will not get those 3 events, 
but should lay itself out based on its children's sizes.  There may be some 
configurations where the component is sized to content and the children's size 
is dependent on the parent's size, but I'm not sure we've had to deal with that 
yet.  In such cases, there would need to be a way to determine a "measured" or 
"preferred" or "default" size of the children or content.

As my earlier post tried to state, a component either has explicit sizes, or is 
sized to content, or will be sized by the parent.  The latter should also 
trigger the 3 events.  Or maybe there's a fourth scenario I'm not thinking of.  
We want to understand your scenario and propose best practices for handling it.

-Alex
 

Reply via email to