That’s surprising to me too.

All you should need to do for separate positioners is to override the 
positioned getter.

> On Mar 5, 2019, at 11:50 PM, Alex Harui <[email protected]> wrote:
> 
> Hi Carlos,
> 
> I'm not sure I understood the question, mainly because I'm surprised that 
> setting position=element in a base class would require the same code in the 
> subclasses.
> 
> There is both a positioner and element variables because some early 
> components were a tree of HTMLElements and the one you set positional styles 
> on (left, right, top, bottom, width, height) might need to be different from 
> the element that is listened to for events and may be the element that has 
> the CSS "id" assigned to it and/or is the element that is referenced in 
> accessibility.
> 
> In many cases, positioner == element.
> 
> I think you have to set positioner in createElement.  But there could 
> certainly be some issue with the lifecycle.  Maybe the runtime error and call 
> stack provides a clue.
> 
> -Alex
> 
> On 3/5/19, 3:44 PM, "Carlos Rovira" <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>    Hi Alex,
> 
>    many time ago to make possible make heavy use of styles easily, I created
>    StyledUIBase that in part composed ClassSelectorList
>    that uses "positioner". That's because jewel components use to be wrapped
>    in other divs or similar to be able to draw it better and get the right
>    look and feel.
> 
>    I had to make put in StyledUIBase.createElement this line
> 
>    positioner = element;
> 
>    to avoid an error at runtime
> 
>    This make me have to add this line in almost all Jewel Components
> 
>    I'm looking at this now with a bit more time to see how I can remove this.
> 
>    I'm starting from an example with just a button or just a label and trying
>    to clean without luck
> 
>    If I left StyledUIBase without code and just extend UIBase still I found an
>    error at runtime.
> 
>    Maybe is too late here and I must close now, but just want to know if you
>    have some clue about what I need to do that just looking to StyledUIbase
>    and Jewel Label or Jewel UIBase createElement.
> 
>    If you have some clue, I can take a look tomorrow and see if I can finally
>    understand what's happening with positioner.
> 
>    Thanks
> 
>    -- 
>    Carlos Rovira
>    
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C56fa5ad2f4fd450273d808d6a1c4777c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636874262532003169&amp;sdata=J4hxDgu3YdDwimJjVNAuqjno7ZxlJoBesksnMSAD8Y4%3D&amp;reserved=0
>  
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C56fa5ad2f4fd450273d808d6a1c4777c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636874262532003169&amp;sdata=J4hxDgu3YdDwimJjVNAuqjno7ZxlJoBesksnMSAD8Y4%3D&amp;reserved=0>

Reply via email to