This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit c7d7d19f075ae7b52f7027731327c8bb9252a8e0 Author: Ovilia <zwl.s...@gmail.com> AuthorDate: Wed Jun 13 17:24:54 2018 +0800 fix(tooltip): getOuterSize was removed by mistake --- src/component/tooltip/TooltipContent.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/component/tooltip/TooltipContent.js b/src/component/tooltip/TooltipContent.js index 110c604..ac0959b 100644 --- a/src/component/tooltip/TooltipContent.js +++ b/src/component/tooltip/TooltipContent.js @@ -273,6 +273,25 @@ TooltipContent.prototype = { isShow: function () { return this._show; + }, + + getOuterSize: function () { + var width = this.el.clientWidth; + var height = this.el.clientHeight; + + // Consider browser compatibility. + // IE8 does not support getComputedStyle. + if (document.defaultView && document.defaultView.getComputedStyle) { + var stl = document.defaultView.getComputedStyle(this.el); + if (stl) { + width += parseInt(stl.paddingLeft, 10) + parseInt(stl.paddingRight, 10) + + parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10); + height += parseInt(stl.paddingTop, 10) + parseInt(stl.paddingBottom, 10) + + parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10); + } + } + + return {width: width, height: height}; } }; -- To stop receiving notification emails like this one, please contact ovi...@apache.org. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org