Make our measured size the size of the thing we're wrapping.
Half the places we use FlexWrapper we do something like this anyway. Note that you can still override this by setting the width and height (which sets the explicitWidth, explicitHeight). git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@614 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -34,7 +34,16 @@ public class FlexWrapper extends UIComponent
|
||||
{
|
||||
// don't capture mouse events in this wrapper
|
||||
mouseEnabled = false;
|
||||
_obj = object;
|
||||
addChild(object);
|
||||
}
|
||||
|
||||
override protected function measure () :void
|
||||
{
|
||||
measuredWidth = _obj.width;
|
||||
measuredHeight = _obj.height;
|
||||
}
|
||||
|
||||
protected var _obj :DisplayObject;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user