浏览代码

fix Ellipsis floor-mid to ceil-mid #1258 (#1680)

niko 7 年之前
父节点
当前提交
0f9f76783a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/Ellipsis/index.js

+ 1 - 1
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);