You want the bounds of what you drew, so getBounds(this) should be correct. If you set scaleX/Y to zoom, you shouldn't need to do anything. If you set scaleX/Y on an internal thing to zoom or in the case of the circle, multiply the radius by some zoom factor, then you have to report that new measuredWidth/Height in measure() and maybe call invalidateList if you have some property like zoomFactor that we're not already watching for changes
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, January 18, 2008 10:36 AM To: [email protected] Subject: RE: [flexcoders] Drawn objects acting as children to components? I thought the container reference was needed by the getBounds() method - it requires an argument of a UIComponent of some kind, I thought the custom component would need to know the new size of the container when it got re-sized. If I don't need the container reference, then maybe I could just say getBounds(this) instead and it would work. Also, I want to implement a method to scale the graphics up and down, I have that working, but I'm back to the graphic not being centered and not staying within the boundaries of the Panel container again when the zoom occurs. I tried calling updateDisplayList again when the zoom action happens, but that didn't work. Any thoughts there? Jason Merrill Bank of America GT&O L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Developer Community ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Friday, January 18, 2008 12:10 PM To: [email protected] Subject: RE: [flexcoders] Drawn objects acting as children to components? I think in the general case, you'll need to set minHeight/minWidth to zero or something small on the Panel or have fixed width/height on the Panel to get the Panel to consider putting up scrollbars. The graphics object should compute measuredMinWidth/measuredMinHeight to be the same as measuredWidht/Height so the Panel will not try to shrink it past its dimensions. If you can compute the measurements w/o drawing then you don't need commitProperties and just draw in updateDisplayList. I don't know why you need a container reference unless it is to get the bounds of the container to determine where to draw, but if you've set up % widht/height you'll be given those dimensions in updateDisplayList. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, January 18, 2008 7:02 AM To: [email protected] Subject: RE: [flexcoders] Drawn objects acting as children to components? Hey Jim, passing minWidth and minHeight to the custom UI component worked perfectly for me - now the drawn graphic is contained in the Panel container - thank you! Jason Merrill Bank of America GT&O L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Developer Community

