You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I mentioned in an earlier issue, some of my pages use very large tooltips (hover over Google and Oracle to see them). The smartPlacement feature is great, but it fails to work very well when every placement yields at least one collision. In the link above, when you hover over Google, no matter where you place the tooltip there will be at least one collision.
However, even where there must be a collision, some placements are more preferable to others. For example, if there must be a collision, then one would prefer the tooltip to be placed in such a way that the user could scroll the screen to see the entire tooltip. That way, even though the tooltip collides with the viewport, it does not collide with the browser window.
I put together a solution, by adding a new collision type that gets set when the tooltip falls outside of the browser window (as opposed to falling outside the viewport). When we're looking for the best placement, it selects the placement with either no viewport collisions, or if none exists the placement with no browser collisions.
Hi again,
As I mentioned in an earlier issue, some of my pages use very large tooltips (hover over Google and Oracle to see them). The smartPlacement feature is great, but it fails to work very well when every placement yields at least one collision. In the link above, when you hover over Google, no matter where you place the tooltip there will be at least one collision.
However, even where there must be a collision, some placements are more preferable to others. For example, if there must be a collision, then one would prefer the tooltip to be placed in such a way that the user could scroll the screen to see the entire tooltip. That way, even though the tooltip collides with the viewport, it does not collide with the browser window.
I put together a solution, by adding a new collision type that gets set when the tooltip falls outside of the browser window (as opposed to falling outside the viewport). When we're looking for the best placement, it selects the placement with either no viewport collisions, or if none exists the placement with no browser collisions.
My solution is located here
The text was updated successfully, but these errors were encountered: