Let's do this then, after the merge of dual into develop: AbsolutePositioningViewBeadBase will be the view bead to use for controls. On the HTML platform, this bead will set its strand's style position to "relative" if it is not set to either "absolute" or "relative" already. In addition, this bead will have a setAbsolutePosition(child, x, y) function that on Flash, just sets x and y while on HTML, sets left and top styles as well as setting position:absolute style.
You could use it like this: Create a view bead class that extends this class and set your custom view bead class in CSS for your control or add it programmatically. The super.strand setter will take care of setting the strand's position style. After you have created any elements required for your control, position them using setAbsolutePosition() and do so in response to changes in your control's size. —peter On 4/25/17, 4:47 PM, "Alex Harui" <aha...@adobe.com> wrote: > > >On 4/25/17, 12:35 PM, "Peter Ent" <p...@adobe.com> wrote: > >>Perhaps I am not understanding this. >> >>You create a control component extending UIBase. You create your view >>bead >>extending AbsolutePositioningViewBase. This bead makes sure that the >>strand/host has position:relative set. >> >>So how do you set position:absolute on each of the control's parts? >>Setting part.x and part.y won't be enough. You still need set >>part.style.position = "absolute". I don't think that will translate over >>to the HTML side and will not be useful to Flash. > >Well, you are right that there is more to it than just the ViewBase. > >However, we are in the business of encapsulating patterns. We could do >any combination of the following: > >1) have setter for x and y set position="absolute" but it won't change the >parent's position style. AbsolutePositioningViewBase would still do that. >2) add a setChildPosition method on AbsolutePositioningViewBase. >3) add xChanged,yChanged listeners to children >4) add childAdded listener to parent and check the child's x,y value > >Thoughts? >-Alex > >> >>‹peter >> >>On 4/25/17, 2:08 PM, "Alex Harui" <aha...@adobe.com> wrote: >> >>> >>> >>>On 4/25/17, 10:55 AM, "yishayw" <yishayj...@hotmail.com> wrote: >>> >>>>App devs may want to write custom controls and would expect flash and >>>>js >>>>behaviour to be the same. I think we should strive to eliminate use of >>>>conditional compilation for app devs. If that's so we don't want them >>>>changing an HTML only style (position). >>> >>>Agreed, which is why we'd offer different base classes for views, one of >>>which assigns the position style. >>> >>>-Alex >>> >> >