From 0f9f76783af20d500b6def76afb4ef66188a439c Mon Sep 17 00:00:00 2001 From: niko <644506165@qq.com> Date: Fri, 15 Jun 2018 11:15:52 +0800 Subject: [PATCH] fix Ellipsis floor-mid to ceil-mid #1258 (#1680) --- src/components/Ellipsis/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Ellipsis/index.js b/src/components/Ellipsis/index.js index 4537b367..8306b5d8 100644 --- a/src/components/Ellipsis/index.js +++ b/src/components/Ellipsis/index.js @@ -109,7 +109,7 @@ export default class Ellipsis extends Component { // bisection const len = text.length; - const mid = Math.floor(len / 2); + const mid = Math.ceil(len / 2); const count = this.bisection(targetHeight, mid, 0, len, text, shadowNode); -- GitLab