Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't let top of tooltip connector extend past top of tooltip content…

…, as it makes the tooltip look broken. Problem occurred with large aroundNodes such as the bubble charts in dojox/charting/tests/test_event2d.html.

Refs #4282, #4997, [23512], !strict.
  • Loading branch information...
commit bd7d404f0341a5e839b4b412181fcc21e520d9cc 1 parent 66be6c4
@wkeese wkeese authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 Tooltip.js
View
9 Tooltip.js
@@ -108,9 +108,12 @@ dojo.declare(
this.connectorNode.style.top = aroundNodePlacement + "px";
this.connectorNode.style.bottom = "";
}else{
- // Align center of connector with center of aroundNode, but don't let bottom
- // of connector extend below bottom of tooltip content
- this.connectorNode.style.bottom = Math.max(aroundNodeCoords.h/2 - tooltipConnectorHeight/2, 0) + "px";
+ // Align center of connector with center of aroundNode, except don't let bottom
+ // of connector extend below bottom of tooltip content, or top of connector
+ // extend past top of tooltip content
+ this.connectorNode.style.bottom = Math.min(
+ Math.max(aroundNodeCoords.h/2 - tooltipConnectorHeight/2, 0),
+ mb.h - tooltipConnectorHeight) + "px";
this.connectorNode.style.top = "";
}
}else{
Please sign in to comment.
Something went wrong with that request. Please try again.