             }
         }
         
-        // The bottom border can grow to allow all the text to fit.
+        // If the width is NaN it can grow up to TextLine.MAX_LINE_WIDTH wide.
+        // If the height is NaN it can grow to allow all the text to fit.
         _textContainerManager.compositionWidth = composeWidth;
-        _textContainerManager.compositionHeight = NaN;
+        _textContainerManager.compositionHeight = composeHeight;
 
         // Compose only.  The display should not be updated.
         _textContainerManager.compose();

    private function textContainerManager_inlineGraphicStatusChangeHandler (
                        event:StatusChangeEvent):void
    {
        //trace("inlineGraphicStatusChangedHandler", event.status);

        // Now that the actual size of the graphic is available need to
        // optionally remeasure and updateContainer.
        if (event.status == InlineGraphicElementStatus.READY)
        {
            if (autoSize)
                invalidateSize();
            
            invalidateDisplayList();
        } 
    }    
}


import flashx.textLayout.edit.SelectionState;
import flashx.textLayout.elements.Configuration;
import flashx.textLayout.elements.GlobalSettings;
import flashx.textLayout.elements.InlineGraphicElement;
import flashx.textLayout.elements.InlineGraphicElementStatus;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.events.CompositionCompleteEvent;
