OK.

I really don’t see how Image could be extensible — especially a raw <img> tag 
on the HTML side. The possible options that can be used for img are very 
limited.[1] Even advanced CSS does not have very good browser support.[2]

Now, I do see how an Image component could be extensible, but that would have 
to be more than a simple <img> tag. I mean something similar to a spark 
BitmapImage component. There’s a strong use case for things like image fitting, 
background color, blending, etc. However to do this, you need to use a div and 
assign all kinds of CSS. (and possibly add more structure within the div 
depending on how crazy you’re getting). This seems to me like a whole new 
component though.

[1]https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2]http://caniuse.com/#search=object-fit
On Aug 9, 2016, at 9:30 AM, Alex Harui <aha...@adobe.com> wrote:

> Maybe check when it got added to the JS side.  There might be a reason.
> Peter may remember when he starts up in a few hours.
> 
> On the SWF side, for things like Button, separate models and views are
> part of the extensibility pattern.  Going back to the expanded form, a
> TextButton would be something like:
> 
> <js:UIBase>
>  <js:beads>
>    <js:TextButtonModel text="Click me" />
>    <js:TextButtonView />
>  </js:beads>
> </js:UIBase>
> 
> To make an icon and text button, you would do:
> 
> <js:UIBase>
>  <js:beads>
>    <js:TextAndIconButtonModel text="Click me" icon="foo.png"/>
>    <js:TextAndIconButtonView />
>  </js:beads>
> </js:UIBase>
> 
> But all of that is how the SWF side builds up to emulating the HTML button
> element.  On the HTML side, we just use the element.
> 
> If you can make the argument that Image is not extensible (won't ever need
> new properties) then you can take out the model and view on the SWF side.
> On the JS side, I think we can take it away since we can directly store
> what is in the model in the element and the element does the view's work
> of layout/presentation.  But again, I might be missing something, so let's
> see if Peter remembers.
> 
> -Alex
> 

Reply via email to