jquery-cluetip icon indicating copy to clipboard operation
jquery-cluetip copied to clipboard

'auto' positionBy and 'local' do not play well together

Open terraswat opened this issue 13 years ago • 4 comments

Nice plugin!

When I use 'auto' positionBy with 'local' content, the cluetip is always positioned at the bottom of my page. The left offset is correct. I must be doing something wrong. I tried with all defaults for cluetip settings, except local: true, and using this form for attaching the cluetip to an element:

var href = '#tutor_welcome'; el.attr({ href: href, rel: href});

An unusual thing I'm doing is triggering the cluetip appearance programatically, as I am using this for a step-by-step tutorial. I trigger it with .mouseenter().

As a work-around, I'm currently using 'fixed' positionBy, however, I would like to take advantage of the automatic positioning in the cases where the trigger element is on the far right of the page.

thanks for any insight, Teresa

terraswat avatar Jan 01 '12 23:01 terraswat

Hi Teresa, Sorry for the delay in getting back to you on this. The problem is mostly likely due to the plugin falling back to using the event.pageX and/or event.pageY properties to determine placement of the tooltip. When the mouseenter event is triggered programmatically, those properties aren't registered with the event system (because you are aren't actually entering the element with the mouse).

kswedberg avatar Jan 31 '12 02:01 kswedberg

thank you Karl, that makes sense, except the left offset is always correct, but not the top offset. Strange that it gets one correct and not the other. Thank you for thinking about it. The users love the tutorial. If you have a moment, you can see your work leveraged at https://genome-cancer.soe.ucsc.edu/proj/site/hgHeatmap/ ;)

cheers, Teresa

On Jan 30, 2012, at 6:14 PM, Karl Swedberg wrote:

Hi Teresa, Sorry for the delay in getting back to you on this. The problem is mostly likely due to the plugin falling back to using the event.pageX and/or event.pageY properties to determine placement of the tooltip. When the mouseenter event is triggered programmatically, those properties aren't registered with the event system (because you are aren't actually entering the element with the mouse).


Reply to this email directly or view it on GitHub: https://github.com/kswedberg/jquery-cluetip/issues/72#issuecomment-3732285

terraswat avatar Jan 31 '12 02:01 terraswat

Very nice implementation! Looks great.

Yeah, it is a little strange that the top offset is the only thing messing up. If you can point me to a test page that demonstrates the problem, I'd be happy to take a look.

kswedberg avatar Jan 31 '12 02:01 kswedberg

Rats, I have no django installed playground outside of our firewall. This was my test if you want to give it a try:

  • all defaults for cluetip settings, except local: true

  • using this form for attaching the cluetip to an element:

    var href = '#tutor_welcome'; el.attr({ href: href, rel: href});

  • trigger the cluetip appearance programatically with .mouseenter()

Teresa

On Jan 30, 2012, at 6:32 PM, Karl Swedberg wrote:

Very nice implementation! Looks great.

Yeah, it is a little strange that the top offset is the only thing messing up. If you can point me to a test page that demonstrates the problem, I'd be happy to take a look.


Reply to this email directly or view it on GitHub: https://github.com/kswedberg/jquery-cluetip/issues/72#issuecomment-3732458

terraswat avatar Jan 31 '12 02:01 terraswat