flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] IUIBase.js has no methods
Date Thu, 18 Sep 2014 18:03:48 GMT

On 9/18/14 10:47 AM, "OmPrakash Muppirala" <bigosmallm@gmail.com> wrote:

>On Thu, Sep 18, 2014 at 9:07 AM, Alex Harui <aharui@adobe.com> wrote:
>> BTW, I was thinking about this some more҆
>> I haven't looked at your code, but are GraphicShapes actually allowed to
>> be children of any container?  Or do they have to be children of a
>> GraphicsContainer?  If the latter, then they shouldn't implement IUIBase
>> and the developer may have to first place a GraphicsContainer in the DOM
>> to contain them.
>The plan is to support both.  GraphicShape is the base class for
>shapes like Rect, Ellipse, etc.  It is also the base class for
>GraphicsContainer which exposes methods like drawRect, drawEllipse, etc.
>In the former case, Rects can be directly added to a container.  In the
>latter case, GraphicsContainer can be added to a container.
I guess I was expecting that you could declaratively describe a complex
graphic and do something like:

	<Rect ..>
	<Circle ..>
	<Path ..>

I would then think the child Rect, Circle and Path shouldn't be heavy.
But I also see the need to have a single shape as a child of a container
and mixed in with other components.

What about doing something similar to Spark?  Spark has a BitmapImage
graphic primitive and an Image component.  FlexJS could have a Rect
component as well as a Rect graphic element that only can be a child of a
GraphicsContainer.  The Rect component can just be a UIBase that is
composed of a GraphicsContainer child with a Rect in it.  That would be
consistent with the composition philosophy of FlexJS:  common patterns get
composited into Components and can be further optimized if needed.


View raw message