All of those ifs are effectively "just-in-case" code.  The reason I asked
about using CSS is that it feels like you are creating a whole new layout
mechanism that CSS probably already has.  So if all of this code could be
replaced with, for example, a few lines code that adds a CSS class on the
tooltip and the CSS in that class selector is what drives the positioning,
I think that would be the smallest, most flexible way of allowing folks to
tweak the tooltip position and it would use a standard mechanism as well.

My 2 cents,
-Alex

On 7/16/17, 11:45 PM, "Justin Mclean" <jus...@classsoftware.com> wrote:

>Hi,
>
>> "Slightly fatter" might be acceptable.  Your changes looked like a lot
>>of
>> code.  
>
>Im not sure you are looking at the same changes I am.
>
> All that was added was:
>-  the TOP, BOTTOM, LEFT, RIGHT constants
>- an if statement with a number of else ifs to work out the positioning
>- changing this line:
>pt = new Point(comp.width, comp.height);
>to this:
>pt = new Point(comp.width/xFactor, comp.height/yFactor);
>
>That seems reasonably slim to me. What is your definition of “slightly
>fatter”?
>
>Thanks,
>Justin
>

Reply via email to