Hovering

com.alecdorrington.annotatedtextformat.dom.Hovering
See theHovering companion object
final class Hovering[A]

Shows tooltip with what content gives for the annotations under the pointer, of whichever decoration it covers, as they are added and removed, for the line of the element under it, within the page's open shadow roots too. content is given the showing that it is for, by which it may replace what it gave, as with an answer that comes later, which is dropped if the tooltip has since closed or moved on. The tooltip stays open while the pointer is within the smallest convex shape holding both that line and it, as it crosses from one to the other, straight or slanting, so that its content may be scrolled or used. If it is interactive, and the mouse opened it, it covers that shape but the line, so that nothing highlighted beneath, on the line beyond or beside the element on its own, takes its place, and keeps to the side of the line it opened on as it grows, scrolling within the room there, lest it move across the line and leave the pointer over the next one instead. It closes as the pointer moves elsewhere, leaves the window, or the page moves the line beneath it, and on Escape, which goes on to the page unless the focus opened the tooltip or is within it, as the page may close its own menus by it. While it is open, the element it is for is described by it.

A touch or a pen, which has no pointer to hover, shows it by a tap, whose click goes no further, as to a link the element is in; and a tap on the element again, or elsewhere, closes it. The annotations that focusing gives take the focus, as by Tab, at the first of their elements that holds any text, showing the tooltip for its first line, which follows the line as the page moves: Tab moves the focus on into the tooltip, if anything there takes it, and on from its last part back to the element, and so on beyond it; Shift and Tab moves from its first part back to the element; and Escape closes it, giving the focus back to the element. Hidden annotations take the focus too, but show nothing.

If trusted, it heeds only what the user does, not events that the page's scripts make.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(decoration: Decoration[A]): Unit

Covers decoration too, those of its annotations that focusing gives taking the focus, and no longer covers those since restored.

Covers decoration too, those of its annotations that focusing gives taking the focus, and no longer covers those since restored.

Attributes

def clear(): Unit

Covers no decoration.

Covers no decoration.

Attributes

def remove(decoration: Decoration[A]): Unit

No longer covers decoration, whose annotations no longer take the focus, closing the tooltip if it is for one of its elements.

No longer covers decoration, whose annotations no longer take the focus, closing the tooltip if it is for one of its elements.

Attributes

def stop(): Unit

Stops showing the tooltip, covering no decoration, and closes it.

Stops showing the tooltip, covering no decoration, and closes it.

Attributes

Concrete fields