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:
Ray Greenwell
2008-08-08 02:17:33 +00:00
parent 05da95bbb4
commit 2e9282a3e5
@@ -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;
}
}