**** BEGIN LOGGING AT Tue Aug 13 03:00:00 2013 Aug 13 03:02:52 yo yo Aug 13 08:34:02 http://www.coding2learn.org/blog/2013/07/29/kids-cant-use-computers/ Aug 13 08:39:11 okay, it's not really about enyo, but it's a great article none the less Aug 13 14:54:52 had some difficulties with tooltips http://jsfiddle.net/joopmicroop/9KGxT/ is there no better solution to solve this? something I'm not seeing/knowing.. Aug 13 14:55:47 hope someone can take a look at this why the tooltips position themselfs based of the window and not by the decorator it's container Aug 13 14:56:22 maybe if float:true then set it to the window otherwise decorators container?? Aug 13 14:56:52 there's some explanation too in the jsfiddle file Aug 13 14:57:05 about the problem Aug 13 14:58:57 plz say that there's a shorter solution to position a tooltip, without writing the events and so on myself Aug 13 15:10:30 nobody has an easy solution? Aug 13 15:19:09 related to this bug report.. https://enyojs.atlassian.net/secure/RapidBoard.jspa?rapidView=3&view=planning&selectedIssue=ENYO-1773 Aug 13 16:45:04 joopmicroop: i don't see an "above" class in your fiddle Aug 13 16:47:07 {kind:'onyx.Tooltip', classes:'above', content:'You don\'t see me'} Aug 13 16:47:28 fx1 : it's there :p Aug 13 16:47:36 yeah i meant in the CSS Aug 13 16:48:01 above is an enyo class Aug 13 16:48:14 as is 'below' Aug 13 16:48:16 ah Aug 13 16:48:21 ;) Aug 13 16:48:58 anyway I've got to go home, got to drive for an hour but afterwards I'll be back Aug 13 16:49:19 if you find a fixie just type it here I'll read the logs Aug 13 16:50:14 at least tkx for looking :) for now ^^ Aug 13 16:50:19 see ya Aug 13 16:50:20 k. BTW onShow is called regardless of your extra functions in joop.Tooltip Aug 13 16:50:48 oh? from enyo.Popup then I presume Aug 13 16:51:05 if you want to overwrite requestShow() all you need to do is add this.inherited(arguments); and then put some logic for below/above Aug 13 16:51:36 events will continue to propogate up the chain by default UNLESS return true; is added into an event function Aug 13 16:51:55 which is why onShow works when you comment out the events part of your kind Aug 13 16:52:42 yeah I know about the propegating thing but just didn't test it that it was already sending that event Aug 13 16:53:21 I'll try the overwrite of requestShow tonight Aug 13 17:10:18 somewhere along the line of the popup being shown, the class is being redefined. it's happening AFTER requestShow() is being called but BEFORE the event "propogates" to your parent kind (where you catch onShow the 'ugly' way) Aug 13 17:11:23 there should be no need for catching onShow in a parent kind just to get the classes correct, that's totally wrong and there's got to be a better way... hrm. Aug 13 19:35:15 okay, i've got your tooltip working as expected, and i've enhanced it so that it shows above ONLY if there is not enough available space below the tooltip. the math in there is a bit foggy but i've tested it against different margins and it works. i also added buttons that raise and lower the margin of your joop button and show the tooltip for example purposes. Aug 13 19:35:18 http://jsfiddle.net/4NF4t/7/ Aug 13 19:36:34 the solution is to basically override the doShow() function in tooltip kind, check math, if enough available space then show below else show above Aug 13 19:43:04 the downsides to *my* solution (with math) is that the math only works if the tooltipdecorator is directly in a container... but you could add more advanced logic to detect which container to call .getBoundingClientRect() on if you needed. also the good part with this is the math is only called onShow(); so it's not eating up BG resources. Aug 13 19:43:05 meh Aug 13 19:43:08 * fx1 went overboard **** ENDING LOGGING AT Wed Aug 14 02:59:59 2013