#36 tooltip popup for non IE Browser is defined as 20 pixels.

open
nobody
TagLibrary (33)
5
2014-03-10
2003-11-19
Kristina Tripp
No

When tooltips are defined for graph the code in

de.laures.cewolf.taglib.tags.ChartMapTag defines

private void writeOutToolTip\(Dataset dataset, Writer

out, final boolean isIE, ChartEntity ce) throws
IOException, JspException {
String toolTip = generateToolTip(dataset, ce);
if (!isIE) {
out.write("ONMOUSEOVER=\"return overlib('" + toolTip
+ ", WIDTH, 20');\" ONMOUSEOUT=\"return nd();\" ");
} else {
out.write("ALT=\"" + toolTip + "\" ");
}
}

By defining the WIDTH as 20 the default values in
overlib library will set the width of the tooltip pop
up box is being defined as 20 pixels. This will be
adjusted slightly so words are not broken. However
this means that if you have allot of text the text will
be very short horizontally and long vertically.
Furthermore, by hardcoding
this as 20 it is not possible for the user to adjust
the size. The
overlib library is designed so users can override any
value. In this case one can't adjust it.

To fix this the writeOutToolTip method should be changed to

private void writeOutToolTip\(Dataset dataset, Writer

out, final boolean isIE, ChartEntity ce) throws
IOException, JspException {
String toolTip = generateToolTip(dataset, ce);
if (!isIE) {
out.write("ONMOUSEOVER=\"return overlib('" + toolTip
+ "');\" ONMOUSEOUT=\"return nd();\" ");
} else {
out.write("ALT=\"" + toolTip + "\" ");
}
}

Removing the WIDTH, 20 in the above will cause the
popup to be
generated by the defined ol_width that is specified in
the overlib.
The user can then over ride this setting by simply
defining there
own value

<script type="text/javascript">

var ol_width="200";

</script>

This is the way that the values in the overlib library
are meant to be overridden at a page level.

I've attached the file will the corrected fix.

- Kristina

Discussion

  • Kristina Tripp
    Kristina Tripp
    2003-11-19

    Logged In: YES
    user_id=872335

    Didn't check box to attach file. Including it now.

     
  • Kristina Tripp
    Kristina Tripp
    2003-11-19

     
    Attachments