question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hover Event over an Overlay that is not bind to a visual element

See original GitHub issue

Hi Guys, I have many overlays set with class: highlight:hover

    .highlight:hover {
        filter:     alpha(opacity=70);
        opacity:    0.7;
        background-color: transparent;
    }

Without attaching any visual ui element to the overlay I can see the result of the outline around the overlays as soon as I am rolling over with the mouse on the overlay area.

What I would like to do is to have 1 visual element <div> attached to the side of the overlay as soon as the mouse is hover it. I am unable to find a way to get the hover event when rolling over an overlay unless I am attaching a visual element to it, what am I missing? Due to the fact that I have many overlays I don’t want to add to the dom so many ui elements just to present 1 tooltip. I want to be able to attach the tool tip without it. Thoughts?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
btelemcommented, May 20, 2020

Thanks Ian! very helpful!

0reactions
iangilmancommented, May 20, 2020

Unfortunately, due to the complicated gesture handling OpenSeadragon does, it ends up blocking some events, so things like $( ".highlight" ).hover won’t necessarily work. You need to use the MouseTracker instead.

Here’s an example for click, but the principle should be the same for hover:

https://codepen.io/iangilman/pen/mEkKaY

BTW, if you’re doing with 30,000 overlays, you might consider using one of the Canvas overlay plug-ins instead, so you can draw them dynamically as needed:

https://github.com/altert/OpenSeadragonCanvasOverlay https://github.com/joshua-gould/OpenSeadragonCanvasOverlayHd

Then you would get events on the viewer itself and do the math to figure out what was hit and what needs highlighting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML "overlay" which allows clicks to fall through to elements ...
Basically you need to add pointer-events: none; CSS to the element above so it is "invisible" to the events. – lepe. Aug 18,...
Read more >
Element: mouseover event - Web APIs | MDN
The mouseover event is fired at an Element when a pointing device (such as a mouse or trackpad) is used to move the...
Read more >
Hover triggers to ALL elements to trigger artboard navigations
Notice that the hover displays a large overlay and covers the remainder of the screen with a semi-opaque gray scrim to indicate modal...
Read more >
Slide-In Overlay Hover Effect (HTML & CSS) - YouTube
Learn how to implement a Slide-In Overlay Hover Effect with HTML and ... upon a click event instead of a hover over the...
Read more >
Understanding SC 1.4.13:Content on Hover or Focus (Level AA)
Therefore, a non-visible component, like a Skip to Main link, that is made visible on keyboard focus (with no additional content beyond the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found