Hover Event over an Overlay that is not bind to a visual element
See original GitHub issueHi 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:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks Ian! very helpful!
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.