Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
Currently when the ice:panelTooltip component is displayed, it *seems* to position itself relative to the mouse position at the time the tooltip hover delay was initiated. This results in it popping up away from mouse if the mouse is moved slightly in the meantime.
It would be better if the panelTooltip would always position itself such that the bottom left corner of the tooltip panel was a few pixels above and to the right of the mouse-position at the time of it's display. We should also add logic similar to the panelPopup such that if displaying the toolTip in the normal position would place it partially off the viewport we adjust it (above left of the mouse, below right, below left, etc. The same logic used for the panelPopup should be used for panelToolip.
It would be better if the panelTooltip would always position itself such that the bottom left corner of the tooltip panel was a few pixels above and to the right of the mouse-position at the time of it's display. We should also add logic similar to the panelPopup such that if displaying the toolTip in the normal position would place it partially off the viewport we adjust it (above left of the mouse, below right, below left, etc. The same logic used for the panelPopup should be used for panelToolip.
There is already code to account for the mouse movement. The problem is that mouse move events are accumulative. So when the hover timer event happens, you only have the cursor position of the last accumulated mouse move event.
Since there is no way to determine the current cursor position without an event , we need to do the popup logic in the mouse move event as well, and coordinate between the hover timer event and mouse move event. But even then, because of the accumulative nature of mouse move events, there is still a chance that the cursor will be too far away from the popup, unless we make the popup move with the mouse.