Completed
Last Updated: 23 Nov 2015 13:02 by ADMIN
ADMIN
Marin Bratanov
Created on: 12 Oct 2015 09:29
Category: ToolTip
Type: Bug Report
0
Callout positions are incorrect in Lightweight RenderMode
A possible workaround is to recalculate the positions in the OnClientShow event. Here is an example for the BottomCenter position

					<script>
						function repositionCallout(sender, args) {
							var callout = $telerik.$(".rtCallout.rtCalloutTopCenter", sender.get_popupElement());
							if (callout.length > 0) { //there is a callout and its position is in the top center (i.e., tooltip's position is BottomCenter)
								var targetPos = $telerik.getBounds(sender.get_targetControl());
								var ttipPos = $telerik.getBounds(sender.get_popupElement());
								var calloutPos = $telerik.getBounds(callout[0]);
								var desiredCalloutLeft = targetPos.x - ttipPos.x + targetPos.width / 2 - calloutPos.width / 2;
								callout.css("left", desiredCalloutLeft);
							}
						}
					</script>
					<telerik:RadToolTip ID="MainMenu" runat="server" TargetControlID="imgbtnMenuIcon" ShowEvent="OnClick" ShowDelay="0" AutoCloseDelay="0" Position="BottomCenter" RelativeTo="Element" RenderMode="Lightweight" Width="500px" Height="500px" OnClientShow="repositionCallout">
						tooltip content
					</telerik:RadToolTip>
0 comments