From 83a08e05d3c464dcc0edb88b436d3e959b8f44b2 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Tue, 25 Jul 2017 18:25:00 -0700 Subject: [PATCH] use offsetWidth/Height to confine tooltip --- src/component/tooltip/TooltipView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.js index b866f866d..90c0433fb 100644 --- a/src/component/tooltip/TooltipView.js +++ b/src/component/tooltip/TooltipView.js @@ -699,8 +699,8 @@ define(function (require) { } function refixTooltipPosition(x, y, el, viewWidth, viewHeight, gapH, gapV) { - var width = el.clientWidth; - var height = el.clientHeight; + var width = el.offsetWidth; + var height = el.offsetHeight; if (gapH != null) { if (x + width + gapH > viewWidth) { @@ -769,4 +769,4 @@ define(function (require) { return align === 'center' || align === 'middle'; } -}); \ No newline at end of file +}); -- GitLab