Craga89/qTip2 — Issue #267: style.tip.width should always be the width of the wide area of the tip
Author: dswitzer
Created: 2011-11-03 19:24:18+00:00
State: open

I'm trying to design a speech bubble tip that is always 16px wide, but 10px high. By "wide" I mean the area of the triangle that merges into the tooltip and by "high" I mean the length of the tooltip. The problem is the style.tip.width and style.tip.height options mean different things depending on where the tip is placed.

If the tip is placed on either the left or right (instead of the top or bottom) then then the style.tip.width and style.tip.height need to be swapped in order to make the tooltip look visually the same. Since I would think most people want tooltips that look visually the same regardless of whether they're on the top/right/bottom/left, I think the meaning of style.tip.width and style.tip.height should be changed so that "width" means length of pixels where the tip merges into the tooltip and "height" means the length of the tip's tail.

This would allow you to always write your options the same way and produce a tip that looks the same. Since I do a lot of dynamic tool tips, this would ease my pain as well.

In a nutshell, all that would need to do is automatically swap the width/height options when the tip is on the left or right.

I realize this would be a change and would affect some people's code, but I believe this would simply things in the long run.