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
Notice that the location that ImageMapster picks for the bedroom closet, shower, and kitchen wall tooltips are not optimal. Some of them actually go off the page when there's plenty of room to display them next to the hotspot. At first, I thought it was a problem with the height of the tooltips, but there are other tooltips that are just as tall, if not taller that are positioned fine.
EDIT: Looking at the source code, it appears that the algorithm only considers six positions. It seems to me that it should consider at least 8 and then pick the one that puts the center of the tooltip closest to the center of the image...
starting at the upper left corner of the hotspot and going clockwise...
upper left corner of hotspot at upper right corner of tooltip
upper left corner of hotspot at lower left corner of tooltip
upper right corner of hotspot at lower right corner of tooltip
upper right corner of hotspot at upper left corner of tooltip
lower right corner of hotspot at lower left corner of tooltip
lower right corner of hotspot at upper right corner of tooltip
lower left corner of hotspot at upper left corner of tooltip
lower left corner of hotspot at lower right corner of tooltip
Another possibly simpler approach might be to connect the center of the image with the center of the hotspot area with an imaginary straight line and place the tooltip based on where the line intersects the hotspot boundary. This will naturally try to place the tooltip toward the center of the image whenever possible.
The text was updated successfully, but these errors were encountered:
Here's a test page with an image map and some tooltips that are displayed when clicking on hotspots:
http://files.3feetunder.com/mold/index.html
Notice that the location that ImageMapster picks for the bedroom closet, shower, and kitchen wall tooltips are not optimal. Some of them actually go off the page when there's plenty of room to display them next to the hotspot. At first, I thought it was a problem with the height of the tooltips, but there are other tooltips that are just as tall, if not taller that are positioned fine.
EDIT: Looking at the source code, it appears that the algorithm only considers six positions. It seems to me that it should consider at least 8 and then pick the one that puts the center of the tooltip closest to the center of the image...
starting at the upper left corner of the hotspot and going clockwise...
upper left corner of hotspot at upper right corner of tooltip
upper left corner of hotspot at lower left corner of tooltip
upper right corner of hotspot at lower right corner of tooltip
upper right corner of hotspot at upper left corner of tooltip
lower right corner of hotspot at lower left corner of tooltip
lower right corner of hotspot at upper right corner of tooltip
lower left corner of hotspot at upper left corner of tooltip
lower left corner of hotspot at lower right corner of tooltip
Another possibly simpler approach might be to connect the center of the image with the center of the hotspot area with an imaginary straight line and place the tooltip based on where the line intersects the hotspot boundary. This will naturally try to place the tooltip toward the center of the image whenever possible.
The text was updated successfully, but these errors were encountered: