Annotation's `click` events don't reach Lightbox/Fancybox #219

Closed
shaitanaa opened this Issue Aug 15, 2013 · 9 comments

Comments

Projects
None yet
3 participants
@shaitanaa

I'm not terribly good with jQuery so forgive me if this question is asinine, but I've been trying to get an annotation to work with Lightbox or Fancybox and neither will work. I've tested links that open with Lightbox elsewhere on the page and they're fine but trying to embed the link as an annotation in Reel just opens the image in a new tab instead of a popup. Any thoughts on what the problem might be?

@pisi

This comment has been minimized.

Show comment
Hide comment
@pisi

pisi Aug 15, 2013

Owner

Can you show me?

Owner

pisi commented Aug 15, 2013

Can you show me?

@lifeinlightspeed

This comment has been minimized.

Show comment
Hide comment
@lifeinlightspeed

lifeinlightspeed Aug 15, 2013

Shaitanaa, I'm not sure about using Fancybox or Lightbox (I've used both) but here's an example of one using Colorbox:

http://www.luxurylifeshop.com/roxy-genuine-python-handbag/

(Click the links next to where it says 360 zoom)

Colorbox: http://www.jacklmoore.com/colorbox/

Shaitanaa, I'm not sure about using Fancybox or Lightbox (I've used both) but here's an example of one using Colorbox:

http://www.luxurylifeshop.com/roxy-genuine-python-handbag/

(Click the links next to where it says 360 zoom)

Colorbox: http://www.jacklmoore.com/colorbox/

@shaitanaa

This comment has been minimized.

Show comment
Hide comment
@shaitanaa

shaitanaa Aug 16, 2013

Ah, should have been more clear - I want Lightbox to launch from an annotated link within a Reel panorama. Lifeinlightspeed, I think the example you showed me is the other way around - a Reel panorama within a Lightbox popup.

Pisi, here's what I'm working on. If you scroll over to the right in the panorama you'll see a button that's supposed to show a zoomed in version of the part of the image it's on top of in a Lightbox popup. I have the same button outside of the annotation div underneath the panorama to show that Lightbox is working there. http://its.monmouth.edu/adasgupt/testing/swp/DiningRoom.html

Ah, should have been more clear - I want Lightbox to launch from an annotated link within a Reel panorama. Lifeinlightspeed, I think the example you showed me is the other way around - a Reel panorama within a Lightbox popup.

Pisi, here's what I'm working on. If you scroll over to the right in the panorama you'll see a button that's supposed to show a zoomed in version of the part of the image it's on top of in a Lightbox popup. I have the same button outside of the annotation div underneath the panorama to show that Lightbox is working there. http://its.monmouth.edu/adasgupt/testing/swp/DiningRoom.html

@pisi

This comment has been minimized.

Show comment
Hide comment
@pisi

pisi Aug 16, 2013

Owner

Oh, OK, I see. It looks like click event isn't emitted from the whole situation, hence the lightbox failure. In other words, a bug. Have the cure already, which I currently test. Thanks for pointing out this issue! It looks to have helped remove quite an awkward portion of the code :) Hold on for the patched code.

Owner

pisi commented Aug 16, 2013

Oh, OK, I see. It looks like click event isn't emitted from the whole situation, hence the lightbox failure. In other words, a bug. Have the cure already, which I currently test. Thanks for pointing out this issue! It looks to have helped remove quite an awkward portion of the code :) Hold on for the patched code.

pisi added a commit that referenced this issue Aug 16, 2013

Not standing in the way of natural state of affairs of a click seems …
…to be more compatible with plugins relying on catching `click` on document level #219

pisi added a commit that referenced this issue Aug 16, 2013

Instead of stopping the click event's propagation, it redirects to `u…
…p.annotations` event, where it gets handled like a regular link. Also makes possible to test this. #219
@pisi

This comment has been minimized.

Show comment
Hide comment
@pisi

pisi Aug 16, 2013

Owner

Now, I didn't add any extra examples yet, but meanwhile please try the code in gh-219-annotation-clicks branch. Replace your jquery.reel.js with this jquery.reel.js from the branch and the annotation link you use on your site should now open into the lightbox.

Please let me know, if that worked for you.

Owner

pisi commented Aug 16, 2013

Now, I didn't add any extra examples yet, but meanwhile please try the code in gh-219-annotation-clicks branch. Replace your jquery.reel.js with this jquery.reel.js from the branch and the annotation link you use on your site should now open into the lightbox.

Please let me know, if that worked for you.

@ghost ghost assigned pisi Aug 16, 2013

@shaitanaa

This comment has been minimized.

Show comment
Hide comment
@shaitanaa

shaitanaa Aug 16, 2013

Thank you so much! Good to know that I wasn't just making some obvious
mistake. I'll try it out first thing on Monday.

On Fri, Aug 16, 2013 at 4:49 PM, Petr Vostřel notifications@github.comwrote:

Now, I didn't add any extra examples yet, but meanwhile please try the
code in gh-219-annotation-clicks branchhttp://pisi/Reel/tree/gh-219-annotation-clicks.
Replace your jquery.reel.js with this _jquery.reel.js_http://pisi/Reel/raw/gh-219-annotation-clicks/jquery.reel.jsfrom the branch and the annotation link you use on your site should now
open into the lightbox.

Please let me know, if that worked for you.


Reply to this email directly or view it on GitHubhttps://github.com/pisi/Reel/issues/219#issuecomment-22793007
.

rupa dasgupta
http://www.rupadasgupta.com
http://www.anoctopusaday.com
http://www.antagonisticouture.com

Thank you so much! Good to know that I wasn't just making some obvious
mistake. I'll try it out first thing on Monday.

On Fri, Aug 16, 2013 at 4:49 PM, Petr Vostřel notifications@github.comwrote:

Now, I didn't add any extra examples yet, but meanwhile please try the
code in gh-219-annotation-clicks branchhttp://pisi/Reel/tree/gh-219-annotation-clicks.
Replace your jquery.reel.js with this _jquery.reel.js_http://pisi/Reel/raw/gh-219-annotation-clicks/jquery.reel.jsfrom the branch and the annotation link you use on your site should now
open into the lightbox.

Please let me know, if that worked for you.


Reply to this email directly or view it on GitHubhttps://github.com/pisi/Reel/issues/219#issuecomment-22793007
.

rupa dasgupta
http://www.rupadasgupta.com
http://www.anoctopusaday.com
http://www.antagonisticouture.com

@shaitanaa

This comment has been minimized.

Show comment
Hide comment
@shaitanaa

shaitanaa Aug 19, 2013

Just tried it - worked perfectly. Thanks again!

Just tried it - worked perfectly. Thanks again!

@pisi

This comment has been minimized.

Show comment
Hide comment
@pisi

pisi Aug 19, 2013

Owner

You're welcome :)

Owner

pisi commented Aug 19, 2013

You're welcome :)

@pisi

This comment has been minimized.

Show comment
Hide comment
@pisi

pisi Nov 5, 2013

Owner

Released today as part of v1.3.0

Owner

pisi commented Nov 5, 2013

Released today as part of v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment