diff --git a/packages/s2-core/__tests__/spreadsheet/__snapshots__/multi-line-text-spec.ts.snap b/packages/s2-core/__tests__/spreadsheet/__snapshots__/multi-line-text-spec.ts.snap
index 3c0f82550e..a41d124d2f 100644
--- a/packages/s2-core/__tests__/spreadsheet/__snapshots__/multi-line-text-spec.ts.snap
+++ b/packages/s2-core/__tests__/spreadsheet/__snapshots__/multi-line-text-spec.ts.snap
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom three max text lines 1`] = `
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should calc correctly row cell height if actual text lines is difference 1`] = `
Array [
Object {
"actualText": "序号",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 53,
+ "height": 68,
"multiLineActualTexts": Array [
"序号",
],
@@ -17,7 +17,7 @@ Array [
"actualText": "省份",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 53,
+ "height": 68,
"multiLineActualTexts": Array [
"省份",
],
@@ -25,14 +25,15 @@ Array [
"width": 96,
},
Object {
- "actualText": "城市城市城市城市城市城市城市城市城...",
- "actualTextHeight": 48,
- "actualTextWidth": 217,
- "height": 53,
+ "actualText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "actualTextHeight": 64,
+ "actualTextWidth": 292,
+ "height": 68,
"multiLineActualTexts": Array [
"城市城市城市",
"城市城市城市",
- "城市城市城...",
+ "城市城市城市",
+ "城市城市城市",
],
"originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 96,
@@ -41,7 +42,7 @@ Array [
"actualText": "类别类别类别类别类别类别类别类别类别类别",
"actualTextHeight": 16,
"actualTextWidth": 241,
- "height": 56,
+ "height": 72,
"multiLineActualTexts": Array [
"类别类别类别类别类别类别类别类别类别类别",
],
@@ -52,7 +53,7 @@ Array [
"actualText": "子类别",
"actualTextHeight": 16,
"actualTextWidth": 37,
- "height": 56,
+ "height": 72,
"multiLineActualTexts": Array [
"子类别",
],
@@ -62,13 +63,13 @@ Array [
]
`;
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom three max text lines 2`] = `
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should calc correctly row cell height if actual text lines is difference 2`] = `
Array [
Object {
"actualText": "1",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 189,
+ "height": 72,
"multiLineActualTexts": Array [
"1",
],
@@ -79,23 +80,82 @@ Array [
"actualText": "2",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 53,
+ "height": 212,
"multiLineActualTexts": Array [
"2",
],
"originalText": "2",
"width": 80,
},
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 212,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
]
`;
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom three max text lines 3`] = `
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should calc correctly row cell height if actual text lines is difference 3`] = `
Array [
+ Object {
+ "actualText": "纸张纸张纸张纸张纸张",
+ "actualTextHeight": 32,
+ "actualTextWidth": 122,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "纸张纸张纸张",
+ "纸张纸张",
+ ],
+ "originalText": "纸张纸张纸张纸张纸张",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 16,
+ "actualTextWidth": 4,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
Object {
"actualText": "家具",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 56,
+ "height": 72,
"multiLineActualTexts": Array [
"家具",
],
@@ -106,7 +166,7 @@ Array [
"actualText": "桌子",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 56,
+ "height": 72,
"multiLineActualTexts": Array [
"桌子",
],
@@ -114,14 +174,15 @@ Array [
"width": 96,
},
Object {
- "actualText": "数量数量数量数量数量数量数量数量数...",
- "actualTextHeight": 45,
- "actualTextWidth": 217,
- "height": 53,
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
"multiLineActualTexts": Array [
"数量数量数量",
"数量数量数量",
- "数量数量数...",
+ "数量数量数量",
+ "数量数量",
],
"originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 96,
@@ -130,7 +191,7 @@ Array [
"actualText": "沙发",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 56,
+ "height": 72,
"multiLineActualTexts": Array [
"沙发",
],
@@ -138,373 +199,356 @@ Array [
"width": 96,
},
Object {
- "actualText": "数量数量数量数量数量数量数量数量数...",
- "actualTextHeight": 45,
- "actualTextWidth": 217,
- "height": 53,
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
"multiLineActualTexts": Array [
"数量数量数量",
"数量数量数量",
- "数量数量数...",
+ "数量数量数量",
+ "数量数量",
],
"originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 96,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom three max text lines 4`] = `
-Array [
Object {
- "actualText": "浙江省",
+ "actualText": "家具家具家具家具家具家具家具家具家具家具家具家...",
+ "actualTextHeight": 64,
+ "actualTextWidth": 290,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "家具家具家具",
+ "家具家具家具",
+ "家具家具家具",
+ "家具家具家...",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 96,
+ },
+ Object {
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌...",
+ "actualTextHeight": 64,
+ "actualTextWidth": 290,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子",
+ "桌子桌子桌子",
+ "桌子桌子桌子",
+ "桌子桌子桌...",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+ Object {
+ "actualText": "办公用品",
"actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 189,
+ "actualTextWidth": 49,
+ "height": 72,
"multiLineActualTexts": Array [
- "浙江省",
+ "办公用品",
],
- "originalText": "浙江省",
+ "originalText": "办公用品",
+ "width": 192,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 16,
+ "actualTextWidth": 13,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
"width": 96,
},
Object {
- "actualText": "浙江省浙江省浙江省浙江省浙江省浙江...",
- "actualTextHeight": 48,
- "actualTextWidth": 217,
- "height": 53,
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
"multiLineActualTexts": Array [
- "浙江省浙江省",
- "浙江省浙江省",
- "浙江省浙江...",
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+ Object {
+ "actualText": "纸张",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "纸张",
+ ],
+ "originalText": "纸张",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 60,
+ "actualTextWidth": 268,
+ "height": 68,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 96,
},
]
`;
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom three max text lines 5`] = `
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should calc correctly row cell height if actual text lines is difference 4`] = `
Array [
Object {
- "actualText": "236723672361111",
+ "actualText": "浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙...",
+ "actualTextHeight": 64,
+ "actualTextWidth": 290,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "浙江浙江浙江",
+ "浙江浙江浙江",
+ "浙江浙江浙江",
+ "浙江浙江浙...",
+ ],
+ "originalText": "浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江",
+ "width": 96,
+ },
+ Object {
+ "actualText": "杭州杭州杭州杭州",
"actualTextHeight": 30,
- "actualTextWidth": 99,
- "height": 30,
+ "actualTextWidth": 98,
+ "height": 72,
"multiLineActualTexts": Array [
- "23672367236",
- "1111",
+ "杭州杭州杭州",
+ "杭州",
],
- "originalText": "236723672361111",
+ "originalText": "杭州杭州杭州杭州",
"width": 96,
},
Object {
- "actualText": "3877",
+ "actualText": "浙江省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 212,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 96,
+ },
+ Object {
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 53,
"multiLineActualTexts": Array [
- "3877",
+ "绍兴市",
],
- "originalText": "3877",
+ "originalText": "绍兴市",
"width": 96,
},
Object {
- "actualText": "4342",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 53,
"multiLineActualTexts": Array [
- "4342",
+ "宁波市",
],
- "originalText": "4342",
+ "originalText": "宁波市",
"width": 96,
},
Object {
- "actualText": "-",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 4,
+ "actualTextWidth": 37,
"height": 53,
"multiLineActualTexts": Array [
- "-",
+ "舟山市",
],
- "originalText": "-",
+ "originalText": "舟山市",
"width": 96,
},
Object {
- "actualText": "-",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 4,
+ "actualTextWidth": 37,
"height": 53,
"multiLineActualTexts": Array [
- "-",
+ "杭州市",
],
- "originalText": "-",
+ "originalText": "杭州市",
"width": 96,
},
Object {
- "actualText": "632",
- "actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 64,
+ "actualTextWidth": 290,
+ "height": 72,
"multiLineActualTexts": Array [
- "632",
+ "浙江省浙江省",
+ "浙江省浙江省",
+ "浙江省浙江省",
+ "浙江省浙江...",
],
- "originalText": "632",
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
"width": 96,
},
Object {
- "actualText": "7234",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 53,
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 290,
+ "height": 72,
"multiLineActualTexts": Array [
- "7234",
+ "杭州市杭州市",
+ "杭州市杭州市",
+ "杭州市杭州市",
+ "杭州市杭州...",
],
- "originalText": "7234",
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
"width": 96,
},
Object {
- "actualText": "834",
- "actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 53,
+ "actualText": "四川省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 212,
"multiLineActualTexts": Array [
- "834",
+ "四川省",
],
- "originalText": "834",
+ "originalText": "四川省",
"width": 96,
},
Object {
- "actualText": "5343",
+ "actualText": "成都市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 53,
"multiLineActualTexts": Array [
- "5343",
+ "成都市",
],
- "originalText": "5343",
+ "originalText": "成都市",
"width": 96,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should calc correctly row cell height if actual text lines is difference 5`] = `
+Array [
Object {
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 53,
+ "height": 72,
"multiLineActualTexts": Array [
"-",
],
"originalText": "-",
"width": 96,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom two max text lines 1`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 38,
- "multiLineActualTexts": Array [
- "序号",
- ],
- "originalText": "序号",
- "width": 80,
- },
- Object {
- "actualText": "省份",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 38,
- "multiLineActualTexts": Array [
- "省份",
- ],
- "originalText": "省份",
- "width": 96,
- },
- Object {
- "actualText": "城市城市城市城市城市城...",
- "actualTextHeight": 32,
- "actualTextWidth": 144,
- "height": 38,
- "multiLineActualTexts": Array [
- "城市城市城市",
- "城市城市城...",
- ],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
- "width": 96,
- },
- Object {
- "actualText": "类别类别类别类别类别类别类别类别类别类别",
- "actualTextHeight": 16,
- "actualTextWidth": 241,
- "height": 40,
- "multiLineActualTexts": Array [
- "类别类别类别类别类别类别类别类别类别类别",
- ],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
- "width": 272,
- },
- Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 40,
- "multiLineActualTexts": Array [
- "子类别",
- ],
- "originalText": "子类别",
- "width": 272,
- },
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom two max text lines 2`] = `
-Array [
- Object {
- "actualText": "1",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 144,
- "multiLineActualTexts": Array [
- "1",
- ],
- "originalText": "1",
- "width": 80,
- },
- Object {
- "actualText": "2",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 38,
- "multiLineActualTexts": Array [
- "2",
- ],
- "originalText": "2",
- "width": 80,
- },
- Object {
- "actualText": "3",
+ "actualText": "-",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 152,
- "multiLineActualTexts": Array [
- "3",
- ],
- "originalText": "3",
- "width": 80,
- },
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom two max text lines 3`] = `
-Array [
- Object {
- "actualText": "家具",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
- "multiLineActualTexts": Array [
- "家具",
- ],
- "originalText": "家具",
- "width": 192,
- },
- Object {
- "actualText": "桌子",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "桌子",
+ "-",
],
- "originalText": "桌子",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "数量数量数量数量数量数...",
- "actualTextHeight": 30,
- "actualTextWidth": 144,
- "height": 38,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "数量数量数量",
- "数量数量数...",
+ "-",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "沙发",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "沙发",
+ "-",
],
- "originalText": "沙发",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "数量数量数量数量数量数...",
- "actualTextHeight": 30,
- "actualTextWidth": 144,
- "height": 38,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "数量数量数量",
- "数量数量数...",
+ "-",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "originalText": "-",
"width": 96,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom two max text lines 4`] = `
-Array [
Object {
- "actualText": "浙江省",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 144,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
"multiLineActualTexts": Array [
- "浙江省",
+ "-",
],
- "originalText": "浙江省",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "浙江省浙江省浙江省浙江...",
- "actualTextHeight": 32,
- "actualTextWidth": 144,
- "height": 38,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "浙江省浙江省",
- "浙江省浙江...",
+ "-",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "四川省",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 152,
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
"multiLineActualTexts": Array [
- "四川省",
+ "-",
],
- "originalText": "四川省",
+ "originalText": "-",
"width": 96,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests PivotSheet should custom two max text lines 5`] = `
-Array [
Object {
"actualText": "236723672361111",
"actualTextHeight": 30,
"actualTextWidth": 99,
- "height": 30,
+ "height": 53,
"multiLineActualTexts": Array [
"23672367236",
"1111",
@@ -516,7 +560,7 @@ Array [
"actualText": "3877",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"3877",
],
@@ -527,7 +571,7 @@ Array [
"actualText": "4342",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"4342",
],
@@ -538,7 +582,7 @@ Array [
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"-",
],
@@ -549,7 +593,7 @@ Array [
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 38,
+ "height": 72,
"multiLineActualTexts": Array [
"-",
],
@@ -560,7 +604,7 @@ Array [
"actualText": "1723",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"1723",
],
@@ -568,32 +612,21 @@ Array [
"width": 96,
},
Object {
- "actualText": "1822",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 38,
- "multiLineActualTexts": Array [
- "1822",
- ],
- "originalText": "1822",
- "width": 96,
- },
- Object {
- "actualText": "1943",
+ "actualText": "-",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 38,
+ "actualTextWidth": 4,
+ "height": 72,
"multiLineActualTexts": Array [
- "1943",
+ "-",
],
- "originalText": "1943",
+ "originalText": "-",
"width": 96,
},
Object {
"actualText": "632",
"actualTextHeight": 15,
"actualTextWidth": 21,
- "height": 30,
+ "height": 53,
"multiLineActualTexts": Array [
"632",
],
@@ -604,7 +637,7 @@ Array [
"actualText": "7234",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"7234",
],
@@ -615,7 +648,7 @@ Array [
"actualText": "834",
"actualTextHeight": 15,
"actualTextWidth": 21,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"834",
],
@@ -626,7 +659,7 @@ Array [
"actualText": "5343",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"5343",
],
@@ -637,7 +670,7 @@ Array [
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 38,
+ "height": 72,
"multiLineActualTexts": Array [
"-",
],
@@ -648,7 +681,7 @@ Array [
"actualText": "2451",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 38,
+ "height": 53,
"multiLineActualTexts": Array [
"2451",
],
@@ -656,25 +689,236 @@ Array [
"width": 96,
},
Object {
- "actualText": "2244",
+ "actualText": "-",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 38,
+ "actualTextWidth": 4,
+ "height": 72,
"multiLineActualTexts": Array [
- "2244",
+ "-",
],
- "originalText": "2244",
+ "originalText": "-",
"width": 96,
},
Object {
- "actualText": "2333",
+ "actualText": "-",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 38,
+ "actualTextWidth": 4,
+ "height": 53,
"multiLineActualTexts": Array [
- "2333",
+ "-",
],
- "originalText": "2333",
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 45,
+ "actualTextWidth": 189,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "77897789778",
+ "97789778977",
+ "897789",
+ ],
+ "originalText": "7789778977897789778977897789",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1304",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1304",
+ ],
+ "originalText": "1304",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1145",
+ "actualTextHeight": 15,
+ "actualTextWidth": 26,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1145",
+ ],
+ "originalText": "1145",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1432",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1432",
+ ],
+ "originalText": "1432",
+ "width": 96,
+ },
+ Object {
+ "actualText": "945",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "945",
+ ],
+ "originalText": "945",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "2335",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "2335",
+ ],
+ "originalText": "2335",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1354",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1354",
+ ],
+ "originalText": "1354",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1523",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1523",
+ ],
+ "originalText": "1523",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1634",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1634",
+ ],
+ "originalText": "1634",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1343",
+ ],
+ "originalText": "1343",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "4004",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "4004",
+ ],
+ "originalText": "4004",
"width": 96,
},
]
@@ -1157,7 +1401,7 @@ Array [
"actualText": "2",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 38,
+ "height": 40,
"multiLineActualTexts": Array [
"2",
],
@@ -1257,7 +1501,7 @@ Array [
"actualText": "浙江省浙江省浙江省浙江...",
"actualTextHeight": 32,
"actualTextWidth": 144,
- "height": 38,
+ "height": 40,
"multiLineActualTexts": Array [
"浙江省浙江省",
"浙江省浙江...",
@@ -1330,7 +1574,7 @@ Array [
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 38,
+ "height": 40,
"multiLineActualTexts": Array [
"-",
],
@@ -1418,7 +1662,7 @@ Array [
"actualText": "-",
"actualTextHeight": 15,
"actualTextWidth": 4,
- "height": 38,
+ "height": 40,
"multiLineActualTexts": Array [
"-",
],
@@ -2802,3482 +3046,8701 @@ Array [
]
`;
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom three max text lines 1`] = `
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines 1`] = `
Array [
Object {
"actualText": "序号",
"actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 56,
+ "height": 53,
"multiLineActualTexts": Array [
"序号",
],
"originalText": "序号",
"width": 80,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom three max text lines 2`] = `
-Array [
Object {
- "actualText": "1",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 53,
"multiLineActualTexts": Array [
- "1",
+ "省份",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "省份",
+ "width": 96,
},
Object {
- "actualText": "2",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualText": "城市城市城市城市城市城市城市城市城...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 217,
+ "height": 53,
"multiLineActualTexts": Array [
- "2",
+ "城市城市城市",
+ "城市城市城市",
+ "城市城市城...",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 96,
},
Object {
- "actualText": "3",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 241,
+ "height": 56,
"multiLineActualTexts": Array [
- "3",
+ "类别类别类别类别类别类别类别类别类别类别",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 272,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 272,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 189,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines 3`] = `
+Array [
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 192,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 217,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 217,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数量",
+ "数量数量数...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines 4`] = `
+Array [
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 189,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 96,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 217,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省",
+ "浙江省浙江省",
+ "浙江省浙江...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines 5`] = `
+Array [
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 99,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "23672367236",
+ "1111",
+ ],
+ "originalText": "236723672361111",
+ "width": 96,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 96,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 96,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 96,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 96,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines for tree mode 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份/城市城市城市城市城市城市...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 184,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "省份/城市城",
+ "市城市城市",
+ "城市城市...",
+ ],
+ "originalText": "省份/城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 100,
+ },
+ Object {
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 32,
+ "actualTextWidth": 242,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "类别类别类别类别类别类别类",
+ "别类别类别类别",
+ ],
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 180,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 180,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines for tree mode 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 112,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 268,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 112,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines for tree mode 3`] = `
+Array [
+ Object {
+ "actualText": "纸张纸张纸张纸张纸张",
+ "actualTextHeight": 32,
+ "actualTextWidth": 122,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "纸张纸张纸张纸",
+ "张纸张",
+ ],
+ "originalText": "纸张纸张纸张纸张纸张",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 16,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 206,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+ Object {
+ "actualText": "家具家具家具家具家具家具家具家具家具家具...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "家具家具家具家",
+ "具家具家具家具",
+ "家具家具家具...",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103,
+ },
+ Object {
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子桌",
+ "子桌子桌子桌子",
+ "桌子桌子桌子...",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 16,
+ "actualTextWidth": 49,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 206,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 16,
+ "actualTextWidth": 13,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+ Object {
+ "actualText": "纸张",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "纸张",
+ ],
+ "originalText": "纸张",
+ "width": 103,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines for tree mode 4`] = `
+Array [
+ Object {
+ "actualText": "浙江浙江浙江浙江浙江浙江浙江...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 181,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "浙江浙江浙",
+ "江浙江浙江",
+ "浙江浙江...",
+ ],
+ "originalText": "浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江",
+ "width": 100,
+ },
+ Object {
+ "actualText": "杭州杭州杭州杭州",
+ "actualTextHeight": 30,
+ "actualTextWidth": 98,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "杭州杭州杭",
+ "州杭州",
+ ],
+ "originalText": "杭州杭州杭州杭州",
+ "width": 100,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 100,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 100,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 100,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 100,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 100,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 181,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "浙江省浙江",
+ "省浙江省浙",
+ "江省浙江...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 100,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render three max text lines for tree mode 5`] = `
+Array [
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "236723672361",
+ "111",
+ ],
+ "originalText": "236723672361111",
+ "width": 103,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 103,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 103,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 103,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 103,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "1304",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1304",
+ ],
+ "originalText": "1304",
+ "width": 103,
+ },
+ Object {
+ "actualText": "1145",
+ "actualTextHeight": 15,
+ "actualTextWidth": 26,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1145",
+ ],
+ "originalText": "1145",
+ "width": 103,
+ },
+ Object {
+ "actualText": "1432",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1432",
+ ],
+ "originalText": "1432",
+ "width": 103,
+ },
+ Object {
+ "actualText": "945",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "945",
+ ],
+ "originalText": "945",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+ Object {
+ "actualText": "1354",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1354",
+ ],
+ "originalText": "1354",
+ "width": 103,
+ },
+ Object {
+ "actualText": "1523",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1523",
+ ],
+ "originalText": "1523",
+ "width": 103,
+ },
+ Object {
+ "actualText": "1634",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1634",
+ ],
+ "originalText": "1634",
+ "width": 103,
+ },
+ Object {
+ "actualText": "1343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 53,
+ "multiLineActualTexts": Array [
+ "1343",
+ ],
+ "originalText": "1343",
+ "width": 103,
+ },
+ Object {
+ "actualText": undefined,
+ "actualTextHeight": 0,
+ "actualTextWidth": 0,
+ "height": 56,
+ "multiLineActualTexts": Array [],
+ "originalText": undefined,
+ "width": 103,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render two max text lines 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "省份",
+ ],
+ "originalText": "省份",
+ "width": 96,
+ },
+ Object {
+ "actualText": "城市城市城市城市城市城...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 144,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "城市城市城市",
+ "城市城市城...",
+ ],
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 96,
+ },
+ Object {
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 241,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "类别类别类别类别类别类别类别类别类别类别",
+ ],
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 272,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 272,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render two max text lines 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 144,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 152,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render two max text lines 3`] = `
+Array [
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 192,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 144,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 96,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 144,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "数量数量数量",
+ "数量数量数...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render two max text lines 4`] = `
+Array [
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 144,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 96,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 144,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省",
+ "浙江省浙江...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 96,
+ },
+ Object {
+ "actualText": "四川省",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 152,
+ "multiLineActualTexts": Array [
+ "四川省",
+ ],
+ "originalText": "四川省",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests PivotSheet should render two max text lines 5`] = `
+Array [
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 99,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "23672367236",
+ "1111",
+ ],
+ "originalText": "236723672361111",
+ "width": 96,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 96,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1723",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "1723",
+ ],
+ "originalText": "1723",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1822",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "1822",
+ ],
+ "originalText": "1822",
+ "width": 96,
+ },
+ Object {
+ "actualText": "1943",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "1943",
+ ],
+ "originalText": "1943",
+ "width": 96,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 96,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 96,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 96,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 96,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 96,
+ },
+ Object {
+ "actualText": "2451",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "2451",
+ ],
+ "originalText": "2451",
+ "width": 96,
+ },
+ Object {
+ "actualText": "2244",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "2244",
+ ],
+ "originalText": "2244",
+ "width": 96,
+ },
+ Object {
+ "actualText": "2333",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 38,
+ "multiLineActualTexts": Array [
+ "2333",
+ ],
+ "originalText": "2333",
+ "width": 96,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly col cell height if actual text lines is difference 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly col cell height if actual text lines is difference 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly col cell height if actual text lines is difference 3`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份省份省份省份省份省份省份省份省份省份省份省份省份省...",
+ "actualTextHeight": 64,
+ "actualTextWidth": 338,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "省份省份省份省",
+ "份省份省份省份",
+ "省份省份省份省",
+ "份省份省份省...",
+ ],
+ "originalText": "省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份省份",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "city",
+ "actualTextHeight": 16,
+ "actualTextWidth": 21,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "city",
+ ],
+ "originalText": "city",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "type",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "type",
+ ],
+ "originalText": "type",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "sub_type",
+ "actualTextHeight": 16,
+ "actualTextWidth": 53,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "sub_type",
+ ],
+ "originalText": "sub_type",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "number",
+ "actualTextHeight": 16,
+ "actualTextWidth": 45,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "number",
+ ],
+ "originalText": "number",
+ "width": 103.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly col cell height if actual text lines is difference 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly col cell height if actual text lines is difference 5`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省浙",
+ "江省浙江省浙江",
+ "省浙江省浙江省",
+ "浙江省浙江省...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "杭州市杭州市杭",
+ "州市杭州市杭州",
+ "市杭州市杭州市",
+ "杭州市杭州市...",
+ ],
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "actualTextHeight": 60,
+ "actualTextWidth": 340,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "家具家具家具家",
+ "具家具家具家具",
+ "家具家具家具家",
+ "具家具家具家具",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子桌",
+ "子桌子桌子桌子",
+ "桌子桌子桌子桌",
+ "子桌子桌子桌...",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "2367236723611",
+ "11",
+ ],
+ "originalText": "236723672361111",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 45,
+ "actualTextWidth": 189,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "7789778977897",
+ "7897789778977",
+ "89",
+ ],
+ "originalText": "7789778977897789778977897789",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "2367236723611",
+ "11",
+ ],
+ "originalText": "236723672361111",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 103.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly data cell height if actual text lines is difference 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly data cell height if actual text lines is difference 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly data cell height if actual text lines is difference 3`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "省份",
+ ],
+ "originalText": "省份",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "actualTextHeight": 64,
+ "actualTextWidth": 292,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "城市城市城市城",
+ "市城市城市城市",
+ "城市城市城市城",
+ "市城市",
+ ],
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 48,
+ "actualTextWidth": 243,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "类别类别类别类",
+ "别类别类别类别",
+ "类别类别类别",
+ ],
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 64,
+ "actualTextWidth": 268,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量数",
+ "量",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly data cell height if actual text lines is difference 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly data cell height if actual text lines is difference 5`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省浙",
+ "江省浙江省浙江",
+ "省浙江省浙江省",
+ "浙江省浙江省...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "杭州市杭州市杭",
+ "州市杭州市杭州",
+ "市杭州市杭州市",
+ "杭州市杭州市...",
+ ],
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "actualTextHeight": 60,
+ "actualTextWidth": 340,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "家具家具家具家",
+ "具家具家具家具",
+ "家具家具家具家",
+ "具家具家具家具",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌...",
+ "actualTextHeight": 60,
+ "actualTextWidth": 338,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子桌",
+ "子桌子桌子桌子",
+ "桌子桌子桌子桌",
+ "子桌子桌子桌...",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "2367236723611",
+ "11",
+ ],
+ "originalText": "236723672361111",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 45,
+ "actualTextWidth": 189,
+ "height": 76,
+ "multiLineActualTexts": Array [
+ "7789778977897",
+ "7897789778977",
+ "89",
+ ],
+ "originalText": "7789778977897789778977897789",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "2367236723611",
+ "11",
+ ],
+ "originalText": "236723672361111",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 103.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly row cell height if actual text lines is difference 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly row cell height if actual text lines is difference 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "10",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "10",
+ ],
+ "originalText": "10",
+ "width": 80,
+ },
+ Object {
+ "actualText": "11",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "11",
+ ],
+ "originalText": "11",
+ "width": 80,
+ },
+ Object {
+ "actualText": "12",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "12",
+ ],
+ "originalText": "12",
+ "width": 80,
+ },
+ Object {
+ "actualText": "13",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "13",
+ ],
+ "originalText": "13",
+ "width": 80,
+ },
+ Object {
+ "actualText": "14",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "14",
+ ],
+ "originalText": "14",
+ "width": 80,
+ },
+ Object {
+ "actualText": "15",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "15",
+ ],
+ "originalText": "15",
+ "width": 80,
+ },
+ Object {
+ "actualText": "16",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "16",
+ ],
+ "originalText": "16",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly row cell height if actual text lines is difference 3`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "省份",
+ ],
+ "originalText": "省份",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "actualTextHeight": 48,
+ "actualTextWidth": 291,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "城市城市城市城市城市",
+ "城市城市城市城市城市",
+ "城市城市",
+ ],
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 32,
+ "actualTextWidth": 242,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "类别类别类别类别类别",
+ "类别类别类别类别类别",
+ ],
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "actualTextHeight": 48,
+ "actualTextWidth": 267,
+ "height": 72,
+ "multiLineActualTexts": Array [
+ "数量数量数量数量数量",
+ "数量数量数量数量数量",
+ "数量",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 143.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly row cell height if actual text lines is difference 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should calc correctly row cell height if actual text lines is difference 5`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "10",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "10",
+ ],
+ "originalText": "10",
+ "width": 80,
+ },
+ Object {
+ "actualText": "11",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "11",
+ ],
+ "originalText": "11",
+ "width": 80,
+ },
+ Object {
+ "actualText": "12",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "12",
+ ],
+ "originalText": "12",
+ "width": 80,
+ },
+ Object {
+ "actualText": "13",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "13",
+ ],
+ "originalText": "13",
+ "width": 80,
+ },
+ Object {
+ "actualText": "14",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "14",
+ ],
+ "originalText": "14",
+ "width": 80,
+ },
+ Object {
+ "actualText": "15",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "15",
+ ],
+ "originalText": "15",
+ "width": 80,
+ },
+ Object {
+ "actualText": "16",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "16",
+ ],
+ "originalText": "16",
+ "width": 80,
+ },
+ Object {
+ "actualText": "浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江",
+ "actualTextHeight": 30,
+ "actualTextWidth": 242,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "浙江浙江浙江浙江浙江",
+ "浙江浙江浙江浙江浙江",
+ ],
+ "originalText": "浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "actualTextHeight": 45,
+ "actualTextWidth": 363,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省浙江省浙",
+ "江省浙江省浙江省浙江",
+ "省浙江省浙江省浙江省",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "杭州杭州杭州杭州",
+ "actualTextHeight": 15,
+ "actualTextWidth": 97,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "杭州杭州杭州杭州",
+ ],
+ "originalText": "杭州杭州杭州杭州",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "actualTextHeight": 45,
+ "actualTextWidth": 363,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "杭州市杭州市杭州市杭",
+ "州市杭州市杭州市杭州",
+ "市杭州市杭州市杭州市",
+ ],
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "纸张纸张纸张纸张纸张",
+ "actualTextHeight": 15,
+ "actualTextWidth": 121,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "纸张纸张纸张纸张纸张",
+ ],
+ "originalText": "纸张纸张纸张纸张纸张",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "actualTextHeight": 45,
+ "actualTextWidth": 339,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "家具家具家具家具家具",
+ "家具家具家具家具家具",
+ "家具家具家具家具",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "家具",
+ ],
+ "originalText": "家具",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "actualTextHeight": 45,
+ "actualTextWidth": 363,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子桌子桌子",
+ "桌子桌子桌子桌子桌子",
+ "桌子桌子桌子桌子桌子",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "沙发",
+ ],
+ "originalText": "沙发",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "笔",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "笔",
+ ],
+ "originalText": "笔",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "纸张",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "纸张",
+ ],
+ "originalText": "纸张",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "纸张",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "纸张",
+ ],
+ "originalText": "纸张",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "-",
+ "actualTextHeight": 15,
+ "actualTextWidth": 4,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "-",
+ ],
+ "originalText": "-",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 15,
+ "actualTextWidth": 98,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "236723672361111",
+ ],
+ "originalText": "236723672361111",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 30,
+ "actualTextWidth": 188,
+ "height": 61,
+ "multiLineActualTexts": Array [
+ "778977897789778977",
+ "8977897789",
+ ],
+ "originalText": "7789778977897789778977897789",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "236723672361111",
+ "actualTextHeight": 15,
+ "actualTextWidth": 98,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "236723672361111",
+ ],
+ "originalText": "236723672361111",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "3877",
+ ],
+ "originalText": "3877",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4342",
+ ],
+ "originalText": "4342",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5343",
+ ],
+ "originalText": "5343",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "632",
+ ],
+ "originalText": "632",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7234",
+ ],
+ "originalText": "7234",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "834",
+ ],
+ "originalText": "834",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "945",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "945",
+ ],
+ "originalText": "945",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "1304",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1304",
+ ],
+ "originalText": "1304",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "1145",
+ "actualTextHeight": 15,
+ "actualTextWidth": 26,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1145",
+ ],
+ "originalText": "1145",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "1432",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1432",
+ ],
+ "originalText": "1432",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "1343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1343",
+ ],
+ "originalText": "1343",
+ "width": 143.8,
+ },
+ Object {
+ "actualText": "1354",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1354",
+ ],
+ "originalText": "1354",
+ "width": 143.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 1`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 2`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "10",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "10",
+ ],
+ "originalText": "10",
+ "width": 80,
+ },
+ Object {
+ "actualText": "11",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "11",
+ ],
+ "originalText": "11",
+ "width": 80,
+ },
+ Object {
+ "actualText": "12",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "12",
+ ],
+ "originalText": "12",
+ "width": 80,
+ },
+ Object {
+ "actualText": "13",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "13",
+ ],
+ "originalText": "13",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 3`] = `
+Array [
+ Object {
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+ Object {
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "省份",
+ ],
+ "originalText": "省份",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "城市城市城市...",
+ "actualTextHeight": 16,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "城市城市城市...",
+ ],
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "类别类别类别...",
+ "actualTextHeight": 16,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "类别类别类别...",
+ ],
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "子类别",
+ ],
+ "originalText": "子类别",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "数量数量数量...",
+ "actualTextHeight": 16,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "数量数量数量...",
+ ],
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "width": 103.8,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 5`] = `
+Array [
+ Object {
+ "actualText": "1",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "1",
+ ],
+ "originalText": "1",
+ "width": 80,
+ },
+ Object {
+ "actualText": "2",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "2",
+ ],
+ "originalText": "2",
+ "width": 80,
+ },
+ Object {
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "3",
+ ],
+ "originalText": "3",
+ "width": 80,
+ },
+ Object {
+ "actualText": "4",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "4",
+ ],
+ "originalText": "4",
+ "width": 80,
+ },
+ Object {
+ "actualText": "5",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "5",
+ ],
+ "originalText": "5",
+ "width": 80,
+ },
+ Object {
+ "actualText": "6",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "6",
+ ],
+ "originalText": "6",
+ "width": 80,
+ },
+ Object {
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "7",
+ ],
+ "originalText": "7",
+ "width": 80,
+ },
+ Object {
+ "actualText": "8",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "8",
+ ],
+ "originalText": "8",
+ "width": 80,
+ },
+ Object {
+ "actualText": "9",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "9",
+ ],
+ "originalText": "9",
+ "width": 80,
+ },
+ Object {
+ "actualText": "10",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "10",
+ ],
+ "originalText": "10",
+ "width": 80,
+ },
+ Object {
+ "actualText": "11",
+ "actualTextHeight": 15,
+ "actualTextWidth": 13,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "11",
+ ],
+ "originalText": "11",
+ "width": 80,
+ },
+ Object {
+ "actualText": "12",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "12",
+ ],
+ "originalText": "12",
+ "width": 80,
+ },
+ Object {
+ "actualText": "13",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "13",
+ ],
+ "originalText": "13",
+ "width": 80,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省浙江省...",
+ "actualTextHeight": 15,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省浙江省...",
+ ],
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "浙江省",
+ ],
+ "originalText": "浙江省",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市杭州市...",
+ "actualTextHeight": 15,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市杭州市...",
+ ],
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "舟山市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "舟山市",
+ ],
+ "originalText": "舟山市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "杭州市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "杭州市",
+ ],
+ "originalText": "杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "宁波市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "宁波市",
+ ],
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "4",
+ "舟山市",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "5",
+ "杭州市",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "6",
+ "绍兴市",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "7",
+ "宁波市",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "8",
+ "舟山市",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "9",
+ "家具",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "10",
+ "actualText": "家具家具家具...",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 83,
"height": 30,
"multiLineActualTexts": Array [
- "10",
+ "家具家具家具...",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "11",
+ "家具",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "12",
+ "家具",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom three max text lines 3`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 56,
+ "height": 30,
"multiLineActualTexts": Array [
- "序号",
+ "家具",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "省份",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 56,
+ "height": 30,
"multiLineActualTexts": Array [
- "省份",
+ "家具",
],
- "originalText": "省份",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "城市城市城市城市城市城市城市城市城市城市...",
- "actualTextHeight": 48,
- "actualTextWidth": 253,
- "height": 56,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "城市城市城市城",
- "市城市城市城市",
- "城市城市城市...",
+ "家具",
],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "类别类别类别类别类别类别类别类别类别类别",
- "actualTextHeight": 48,
- "actualTextWidth": 243,
- "height": 56,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "类别类别类别类",
- "别类别类别类别",
- "类别类别类别",
+ "家具",
],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 56,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "子类别",
+ "家具",
],
- "originalText": "子类别",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "数量数量数量数量数量数量数量数量数量数量...",
- "actualTextHeight": 48,
- "actualTextWidth": 253,
- "height": 56,
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
"multiLineActualTexts": Array [
- "数量数量数量数",
- "量数量数量数量",
- "数量数量数量...",
+ "办公用品",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "originalText": "办公用品",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom three max text lines 4`] = `Array []`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom three max text lines 5`] = `
-Array [
Object {
- "actualText": "1",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 49,
"height": 30,
"multiLineActualTexts": Array [
- "1",
+ "办公用品",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "办公用品",
+ ],
+ "originalText": "办公用品",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子桌子桌子...",
+ "actualTextHeight": 15,
+ "actualTextWidth": 83,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子桌子桌子...",
+ ],
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "桌子",
+ ],
+ "originalText": "桌子",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "2",
+ "桌子",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "3",
+ "沙发",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "4",
+ "沙发",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "5",
+ "沙发",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "6",
+ "沙发",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 13,
"height": 30,
"multiLineActualTexts": Array [
- "7",
+ "笔",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 13,
"height": 30,
"multiLineActualTexts": Array [
- "8",
+ "笔",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 13,
"height": 30,
"multiLineActualTexts": Array [
- "9",
+ "笔",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "10",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 13,
"height": 30,
"multiLineActualTexts": Array [
- "10",
+ "笔",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "23672367236...",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 84,
"height": 30,
"multiLineActualTexts": Array [
- "11",
+ "23672367236...",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "236723672361111",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "77897789778...",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 84,
"height": 30,
"multiLineActualTexts": Array [
- "12",
+ "77897789778...",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "7789778977897789778977897789",
+ "width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "23672367236...",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 84,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "23672367236...",
],
- "originalText": "浙江省",
+ "originalText": "236723672361111",
"width": 103.8,
},
Object {
- "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江...",
- "actualTextHeight": 45,
- "actualTextWidth": 253,
+ "actualText": "3877",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省浙江省浙",
- "江省浙江省浙江",
- "省浙江省浙江...",
+ "3877",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "3877",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "4342",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "4342",
],
- "originalText": "浙江省",
+ "originalText": "4342",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "5343",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "5343",
],
- "originalText": "浙江省",
+ "originalText": "5343",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "632",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "632",
],
- "originalText": "浙江省",
+ "originalText": "632",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "7234",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "7234",
],
- "originalText": "浙江省",
+ "originalText": "7234",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "834",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "834",
],
- "originalText": "浙江省",
+ "originalText": "834",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "945",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "945",
],
- "originalText": "浙江省",
+ "originalText": "945",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "1304",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "1304",
],
- "originalText": "浙江省",
+ "originalText": "1304",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "1145",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 26,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "1145",
],
- "originalText": "浙江省",
+ "originalText": "1145",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "1432",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "1432",
],
- "originalText": "浙江省",
+ "originalText": "1432",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 1`] = `
+Array [
Object {
- "actualText": "浙江省",
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 2`] = `
+Array [
+ Object {
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "1",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "绍兴市",
+ "2",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州...",
- "actualTextHeight": 45,
- "actualTextWidth": 253,
- "height": 30,
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "杭州市杭州市杭",
- "州市杭州市杭州",
- "市杭州市杭州...",
+ "3",
],
- "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "4",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "宁波市",
+ "5",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "舟山市",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "舟山市",
+ "6",
],
- "originalText": "舟山市",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "杭州市",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "杭州市",
+ "7",
],
- "originalText": "杭州市",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "8",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "宁波市",
+ "9",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "舟山市",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "舟山市",
+ "10",
],
- "originalText": "舟山市",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
Object {
- "actualText": "杭州市",
+ "actualText": "11",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "杭州市",
+ "11",
],
- "originalText": "杭州市",
- "width": 103.8,
+ "originalText": "11",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "12",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "12",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "12",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
+ "actualText": "13",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "宁波市",
+ "13",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "13",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "14",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "家具",
+ "14",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "14",
+ "width": 80,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 3`] = `
+Array [
Object {
- "actualText": "家具家具家具家具家具家具家具家具家具家具...",
- "actualTextHeight": 45,
- "actualTextWidth": 253,
- "height": 30,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具家具家具家",
- "具家具家具家具",
- "家具家具家具...",
+ "序号",
],
- "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
+ "actualText": "省份",
+ "actualTextHeight": 16,
"actualTextWidth": 25,
- "height": 30,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具",
+ "省份",
],
- "originalText": "家具",
+ "originalText": "省份",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "城市城市城市城市城市城市城...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具",
+ "城市城市城市城",
+ "市城市城市城...",
],
- "originalText": "家具",
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "类别类别类别类别类别类别类...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具",
+ "类别类别类别类",
+ "别类别类别类...",
],
- "originalText": "家具",
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具",
+ "子类别",
],
- "originalText": "家具",
+ "originalText": "子类别",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "数量数量数量数量数量数量数...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 40,
"multiLineActualTexts": Array [
- "家具",
+ "数量数量数量数",
+ "量数量数量数...",
],
- "originalText": "家具",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 5`] = `
+Array [
Object {
- "actualText": "家具",
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "家具",
+ "1",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "家具",
+ "2",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "3",
"actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "办公用品",
+ "3",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "办公用品",
+ "4",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "办公用品",
+ "5",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "桌子",
+ "6",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子...",
- "actualTextHeight": 45,
- "actualTextWidth": 253,
- "height": 30,
+ "actualText": "7",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "桌子桌子桌子桌",
- "子桌子桌子桌子",
- "桌子桌子桌子...",
+ "7",
],
- "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "桌子",
+ "8",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 20,
"multiLineActualTexts": Array [
- "桌子",
+ "9",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "桌子",
+ "10",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "11",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "沙发",
+ "11",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "11",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "12",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "沙发",
+ "12",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "12",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "13",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "沙发",
+ "13",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "13",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "14",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 14,
+ "height": 20,
"multiLineActualTexts": Array [
- "沙发",
+ "14",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "14",
+ "width": 80,
},
Object {
- "actualText": "笔",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "浙江省",
],
- "originalText": "笔",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "笔",
- "actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualText": "浙江省浙江省浙江省浙江省浙...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "浙江省浙江省浙",
+ "江省浙江省浙...",
],
- "originalText": "笔",
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "浙江省",
],
- "originalText": "笔",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "236723672361111",
- "actualTextHeight": 30,
- "actualTextWidth": 100,
- "height": 30,
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "2367236723611",
- "11",
+ "浙江省",
],
- "originalText": "236723672361111",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "7789778977897789778977897789",
- "actualTextHeight": 45,
- "actualTextWidth": 189,
- "height": 30,
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "7789778977897",
- "7897789778977",
- "89",
+ "浙江省",
],
- "originalText": "7789778977897789778977897789",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "236723672361111",
- "actualTextHeight": 30,
- "actualTextWidth": 100,
- "height": 30,
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "2367236723611",
- "11",
+ "浙江省",
],
- "originalText": "236723672361111",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "3877",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "3877",
+ "浙江省",
],
- "originalText": "3877",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "4342",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "4342",
+ "浙江省",
],
- "originalText": "4342",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "5343",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "5343",
+ "浙江省",
],
- "originalText": "5343",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "632",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "632",
+ "浙江省",
],
- "originalText": "632",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "7234",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "7234",
+ "浙江省",
],
- "originalText": "7234",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "834",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "834",
+ "浙江省",
],
- "originalText": "834",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "945",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "945",
+ "浙江省",
],
- "originalText": "945",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "1304",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "1304",
+ "浙江省",
],
- "originalText": "1304",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "1145",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 26,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "1145",
+ "绍兴市",
],
- "originalText": "1145",
+ "originalText": "绍兴市",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom two max text lines 1`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
+ "actualText": "杭州市杭州市杭州市杭州市杭...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
"multiLineActualTexts": Array [
- "序号",
+ "杭州市杭州市杭",
+ "州市杭州市杭...",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom two max text lines 2`] = `
-Array [
Object {
- "actualText": "1",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "1",
+ "绍兴市",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "2",
+ "宁波市",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "3",
+ "舟山市",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "4",
+ "杭州市",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "5",
+ "绍兴市",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "6",
+ "宁波市",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "7",
+ "舟山市",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "8",
+ "杭州市",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "9",
+ "绍兴市",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "10",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "10",
+ "宁波市",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "11",
+ "舟山市",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 20,
"multiLineActualTexts": Array [
- "12",
+ "杭州市",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom two max text lines 3`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 40,
+ "height": 46,
"multiLineActualTexts": Array [
- "序号",
+ "家具",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "省份",
- "actualTextHeight": 16,
+ "actualText": "家具家具家具家具家具家具家...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
+ "multiLineActualTexts": Array [
+ "家具家具家具家",
+ "具家具家具家...",
+ ],
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 40,
+ "height": 46,
"multiLineActualTexts": Array [
- "省份",
+ "家具",
],
- "originalText": "省份",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "城市城市城市城市城市城市城...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 40,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "城市城市城市城",
- "市城市城市城...",
+ "家具",
],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "类别类别类别类别类别类别类...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 40,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "类别类别类别类",
- "别类别类别类...",
+ "家具",
],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 40,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "子类别",
+ "家具",
],
- "originalText": "子类别",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "数量数量数量数量数量数量数...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 40,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "数量数量数量数",
- "量数量数量数...",
+ "家具",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "originalText": "家具",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom two max text lines 4`] = `Array []`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should custom two max text lines 5`] = `
-Array [
Object {
- "actualText": "1",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "1",
+ "家具",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "2",
+ "家具",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 49,
+ "height": 20,
"multiLineActualTexts": Array [
- "3",
+ "办公用品",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 49,
+ "height": 20,
"multiLineActualTexts": Array [
- "4",
+ "办公用品",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 49,
+ "height": 20,
"multiLineActualTexts": Array [
- "5",
+ "办公用品",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 49,
+ "height": 20,
"multiLineActualTexts": Array [
- "6",
+ "办公用品",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 49,
+ "height": 20,
"multiLineActualTexts": Array [
- "7",
+ "办公用品",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "8",
+ "桌子",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "9",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualText": "桌子桌子桌子桌子桌子桌子桌...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
"multiLineActualTexts": Array [
- "9",
+ "桌子桌子桌子桌",
+ "子桌子桌子桌...",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
},
Object {
- "actualText": "10",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "10",
+ "桌子",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "11",
+ "桌子",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "12",
+ "桌子",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "沙发",
],
- "originalText": "浙江省",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "浙江省浙江省浙江省浙江省浙...",
- "actualTextHeight": 30,
- "actualTextWidth": 168,
- "height": 30,
+ "actualText": "沙发",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省浙江省浙",
- "江省浙江省浙...",
+ "沙发",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "沙发",
],
- "originalText": "浙江省",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "沙发",
],
- "originalText": "浙江省",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "笔",
],
- "originalText": "浙江省",
+ "originalText": "笔",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "笔",
],
- "originalText": "浙江省",
+ "originalText": "笔",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "笔",
],
- "originalText": "浙江省",
+ "originalText": "笔",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 13,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "笔",
],
- "originalText": "浙江省",
+ "originalText": "笔",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "纸张",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 20,
"multiLineActualTexts": Array [
- "浙江省",
+ "纸张",
],
- "originalText": "浙江省",
+ "originalText": "纸张",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "2367236723611",
+ "11",
],
- "originalText": "浙江省",
+ "originalText": "236723672361111",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "778977897789778977897789...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 172,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "7789778977897",
+ "78977897789...",
],
- "originalText": "浙江省",
+ "originalText": "7789778977897789778977897789",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "2367236723611",
+ "11",
],
- "originalText": "浙江省",
+ "originalText": "236723672361111",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "3877",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "3877",
],
- "originalText": "绍兴市",
+ "originalText": "3877",
"width": 103.8,
},
Object {
- "actualText": "杭州市杭州市杭州市杭州市杭...",
- "actualTextHeight": 30,
- "actualTextWidth": 168,
- "height": 30,
+ "actualText": "4342",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "杭州市杭州市杭",
- "州市杭州市杭...",
+ "4342",
],
- "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "originalText": "4342",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "5343",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "5343",
],
- "originalText": "绍兴市",
+ "originalText": "5343",
"width": 103.8,
},
Object {
- "actualText": "宁波市",
+ "actualText": "632",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 21,
+ "height": 20,
"multiLineActualTexts": Array [
- "宁波市",
+ "632",
],
- "originalText": "宁波市",
+ "originalText": "632",
"width": 103.8,
},
Object {
- "actualText": "舟山市",
+ "actualText": "7234",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "舟山市",
+ "7234",
],
- "originalText": "舟山市",
+ "originalText": "7234",
"width": 103.8,
},
Object {
- "actualText": "杭州市",
+ "actualText": "834",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 21,
+ "height": 20,
"multiLineActualTexts": Array [
- "杭州市",
+ "834",
],
- "originalText": "杭州市",
+ "originalText": "834",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "945",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 21,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "945",
],
- "originalText": "绍兴市",
+ "originalText": "945",
"width": 103.8,
},
Object {
- "actualText": "宁波市",
+ "actualText": "1304",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "宁波市",
+ "1304",
],
- "originalText": "宁波市",
+ "originalText": "1304",
"width": 103.8,
},
Object {
- "actualText": "舟山市",
+ "actualText": "1145",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 26,
+ "height": 20,
"multiLineActualTexts": Array [
- "舟山市",
+ "1145",
],
- "originalText": "舟山市",
+ "originalText": "1145",
"width": 103.8,
},
Object {
- "actualText": "杭州市",
+ "actualText": "1432",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "杭州市",
+ "1432",
],
- "originalText": "杭州市",
+ "originalText": "1432",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "1343",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 27,
+ "height": 20,
"multiLineActualTexts": Array [
- "绍兴市",
+ "1343",
],
- "originalText": "绍兴市",
+ "originalText": "1343",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust row height if custom cell style less than actual text height 1`] = `
+Array [
Object {
- "actualText": "宁波市",
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
+ "multiLineActualTexts": Array [
+ "序号",
+ ],
+ "originalText": "序号",
+ "width": 80,
+ },
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust row height if custom cell style less than actual text height 2`] = `
+Array [
+ Object {
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "宁波市",
+ "1",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 61,
"multiLineActualTexts": Array [
- "家具",
+ "2",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "家具家具家具家具家具家具家...",
- "actualTextHeight": 30,
- "actualTextWidth": 168,
- "height": 30,
+ "actualText": "3",
+ "actualTextHeight": 15,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "家具家具家具家",
- "具家具家具家...",
+ "3",
],
- "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "4",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "5",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "6",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "7",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "8",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "9",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 14,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "10",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust row height if custom cell style less than actual text height 3`] = `
+Array [
Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
"multiLineActualTexts": Array [
- "办公用品",
+ "序号",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
"multiLineActualTexts": Array [
- "办公用品",
+ "省份",
],
- "originalText": "办公用品",
+ "originalText": "省份",
"width": 103.8,
},
Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 30,
+ "actualText": "城市城市城市城市城市城市城市城市城市城市...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
"multiLineActualTexts": Array [
- "办公用品",
+ "城市城市城市城",
+ "市城市城市城市",
+ "城市城市城市...",
],
- "originalText": "办公用品",
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 103.8,
},
Object {
- "actualText": "桌子",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 48,
+ "actualTextWidth": 243,
+ "height": 56,
"multiLineActualTexts": Array [
- "桌子",
+ "类别类别类别类",
+ "别类别类别类别",
+ "类别类别类别",
],
- "originalText": "桌子",
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
"width": 103.8,
},
Object {
- "actualText": "桌子桌子桌子桌子桌子桌子桌...",
- "actualTextHeight": 30,
- "actualTextWidth": 168,
- "height": 30,
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 56,
"multiLineActualTexts": Array [
- "桌子桌子桌子桌",
- "子桌子桌子桌...",
+ "子类别",
],
- "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "originalText": "子类别",
"width": 103.8,
},
Object {
- "actualText": "桌子",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
"multiLineActualTexts": Array [
- "桌子",
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
],
- "originalText": "桌子",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust row height if custom cell style less than actual text height 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust row height if custom cell style less than actual text height 5`] = `
+Array [
Object {
- "actualText": "桌子",
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "桌子",
+ "1",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 61,
"multiLineActualTexts": Array [
- "桌子",
+ "2",
],
- "originalText": "桌子",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "3",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "沙发",
+ "3",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "4",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "5",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "沙发",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "6",
],
- "originalText": "沙发",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "笔",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "7",
],
- "originalText": "笔",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "笔",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "8",
],
- "originalText": "笔",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "笔",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "9",
],
- "originalText": "笔",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "236723672361111",
- "actualTextHeight": 30,
- "actualTextWidth": 100,
+ "actualText": "10",
+ "actualTextHeight": 15,
+ "actualTextWidth": 14,
"height": 30,
"multiLineActualTexts": Array [
- "2367236723611",
- "11",
+ "10",
],
- "originalText": "236723672361111",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
Object {
- "actualText": "778977897789778977897789...",
- "actualTextHeight": 30,
- "actualTextWidth": 172,
- "height": 30,
+ "actualText": "浙江省",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "7789778977897",
- "78977897789...",
+ "浙江省",
],
- "originalText": "7789778977897789778977897789",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "236723672361111",
- "actualTextHeight": 30,
- "actualTextWidth": 100,
- "height": 30,
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "2367236723611",
- "11",
+ "浙江省浙江省浙",
+ "江省浙江省浙江",
+ "省浙江省浙江...",
],
- "originalText": "236723672361111",
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
"width": 103.8,
},
Object {
- "actualText": "3877",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "3877",
+ "浙江省",
],
- "originalText": "3877",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "4342",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "4342",
+ "浙江省",
],
- "originalText": "4342",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "5343",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "5343",
+ "浙江省",
],
- "originalText": "5343",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "632",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "632",
+ "浙江省",
],
- "originalText": "632",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "7234",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "7234",
+ "浙江省",
],
- "originalText": "7234",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "834",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "834",
+ "浙江省",
],
- "originalText": "834",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "945",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 21,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "945",
+ "浙江省",
],
- "originalText": "945",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "1304",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "1304",
+ "浙江省",
],
- "originalText": "1304",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "1145",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 26,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "1145",
+ "绍兴市",
],
- "originalText": "1145",
+ "originalText": "绍兴市",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 1`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "序号",
+ "杭州市杭州市杭",
+ "州市杭州市杭州",
+ "市杭州市杭州...",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 2`] = `
-Array [
Object {
- "actualText": "1",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "1",
+ "绍兴市",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "2",
+ "宁波市",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "3",
+ "舟山市",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "4",
+ "杭州市",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "5",
+ "绍兴市",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "绍兴市",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "6",
+ "宁波市",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "宁波市",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "7",
+ "舟山市",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "舟山市",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "8",
+ "杭州市",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "杭州市",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "9",
+ "家具",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "10",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualText": "家具家具家具家具家具家具家具家具家具家具...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "10",
+ "家具家具家具家",
+ "具家具家具家具",
+ "家具家具家具...",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "11",
+ "家具",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "12",
+ "家具",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "13",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "13",
+ "家具",
],
- "originalText": "13",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 3`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "序号",
+ "家具",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "省份",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "省份",
+ "家具",
],
- "originalText": "省份",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "城市城市城市...",
- "actualTextHeight": 16,
- "actualTextWidth": 83,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "城市城市城市...",
+ "家具",
],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "类别类别类别...",
- "actualTextHeight": 16,
- "actualTextWidth": 83,
+ "actualText": "家具",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "类别类别类别...",
+ "家具",
],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
+ "actualText": "办公用品",
+ "actualTextHeight": 15,
+ "actualTextWidth": 49,
"height": 30,
"multiLineActualTexts": Array [
- "子类别",
+ "办公用品",
],
- "originalText": "子类别",
+ "originalText": "办公用品",
"width": 103.8,
},
Object {
- "actualText": "数量数量数量...",
- "actualTextHeight": 16,
- "actualTextWidth": 83,
- "height": 30,
+ "actualText": "桌子",
+ "actualTextHeight": 15,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "数量数量数量...",
+ "桌子",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
+ "originalText": "桌子",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 4`] = `Array []`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should default render one line text 5`] = `
-Array [
Object {
- "actualText": "1",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "1",
+ "桌子桌子桌子桌",
+ "子桌子桌子桌子",
+ "桌子桌子桌子...",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "2",
+ "桌子",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "3",
+ "桌子",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "4",
+ "桌子",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "5",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "5",
+ "沙发",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "6",
+ "沙发",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "7",
+ "沙发",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "8",
+ "沙发",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 7,
+ "actualTextWidth": 13,
"height": 30,
"multiLineActualTexts": Array [
- "9",
+ "笔",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "10",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "10",
+ "2367236723611",
+ "11",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "236723672361111",
+ "width": 103.8,
},
Object {
- "actualText": "11",
- "actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 45,
+ "actualTextWidth": 189,
+ "height": 61,
"multiLineActualTexts": Array [
- "11",
+ "7789778977897",
+ "7897789778977",
+ "89",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "7789778977897789778977897789",
+ "width": 103.8,
},
Object {
- "actualText": "12",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 30,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "12",
+ "2367236723611",
+ "11",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "236723672361111",
+ "width": 103.8,
},
Object {
- "actualText": "13",
+ "actualText": "3877",
"actualTextHeight": 15,
- "actualTextWidth": 14,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "13",
+ "3877",
],
- "originalText": "13",
- "width": 80,
+ "originalText": "3877",
+ "width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "4342",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "4342",
],
- "originalText": "浙江省",
+ "originalText": "4342",
"width": 103.8,
},
Object {
- "actualText": "浙江省浙江省...",
+ "actualText": "5343",
"actualTextHeight": 15,
- "actualTextWidth": 83,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省浙江省...",
+ "5343",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "5343",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "632",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "632",
],
- "originalText": "浙江省",
+ "originalText": "632",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "7234",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 27,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "7234",
],
- "originalText": "浙江省",
+ "originalText": "7234",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "834",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "834",
],
- "originalText": "浙江省",
+ "originalText": "834",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
+ "actualText": "945",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 21,
"height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "945",
],
- "originalText": "浙江省",
+ "originalText": "945",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should not adaptive adjust cell height if custom cell style more than actual text height 1`] = `
+Array [
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "序号",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "省份",
],
- "originalText": "浙江省",
+ "originalText": "省份",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "城市城市城市城市城市城市城...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "城市城市城市城",
+ "市城市城市城...",
],
- "originalText": "浙江省",
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "类别类别类别类别类别类别类...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "类别类别类别类",
+ "别类别类别类...",
],
- "originalText": "浙江省",
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
+ "actualText": "子类别",
+ "actualTextHeight": 16,
"actualTextWidth": 37,
- "height": 30,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "子类别",
],
- "originalText": "浙江省",
+ "originalText": "子类别",
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "数量数量数量数量数量数量数...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 70,
"multiLineActualTexts": Array [
- "浙江省",
+ "数量数量数量数",
+ "量数量数量数...",
],
- "originalText": "浙江省",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render three max text lines 1`] = `
+Array [
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
"multiLineActualTexts": Array [
- "浙江省",
+ "序号",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render three max text lines 2`] = `
+Array [
Object {
- "actualText": "绍兴市",
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "绍兴市",
+ "1",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "杭州市杭州市...",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 83,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 61,
"multiLineActualTexts": Array [
- "杭州市杭州市...",
+ "2",
],
- "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "3",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "绍兴市",
+ "3",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "宁波市",
+ "4",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "舟山市",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "舟山市",
+ "5",
],
- "originalText": "舟山市",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "杭州市",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "杭州市",
+ "6",
],
- "originalText": "杭州市",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "绍兴市",
+ "7",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "宁波市",
+ "8",
],
- "originalText": "宁波市",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "舟山市",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "舟山市",
+ "9",
],
- "originalText": "舟山市",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "杭州市",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 37,
+ "actualTextWidth": 14,
"height": 30,
"multiLineActualTexts": Array [
- "杭州市",
+ "10",
],
- "originalText": "杭州市",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render three max text lines 3`] = `
+Array [
Object {
- "actualText": "绍兴市",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
"multiLineActualTexts": Array [
- "绍兴市",
+ "序号",
],
- "originalText": "绍兴市",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
Object {
- "actualText": "宁波市",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 56,
"multiLineActualTexts": Array [
- "宁波市",
+ "省份",
],
- "originalText": "宁波市",
+ "originalText": "省份",
"width": 103.8,
},
Object {
- "actualText": "舟山市",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 30,
+ "actualText": "城市城市城市城市城市城市城市城市城市城市...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
"multiLineActualTexts": Array [
- "舟山市",
+ "城市城市城市城",
+ "市城市城市城市",
+ "城市城市城市...",
],
- "originalText": "舟山市",
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "类别类别类别类别类别类别类别类别类别类别",
+ "actualTextHeight": 48,
+ "actualTextWidth": 243,
+ "height": 56,
"multiLineActualTexts": Array [
- "家具",
+ "类别类别类别类",
+ "别类别类别类别",
+ "类别类别类别",
],
- "originalText": "家具",
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
"width": 103.8,
},
Object {
- "actualText": "家具家具家具...",
- "actualTextHeight": 15,
- "actualTextWidth": 83,
- "height": 30,
+ "actualText": "子类别",
+ "actualTextHeight": 16,
+ "actualTextWidth": 37,
+ "height": 56,
"multiLineActualTexts": Array [
- "家具家具家具...",
+ "子类别",
],
- "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
+ "originalText": "子类别",
"width": 103.8,
},
Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualText": "数量数量数量数量数量数量数量数量数量数量...",
+ "actualTextHeight": 48,
+ "actualTextWidth": 253,
+ "height": 56,
"multiLineActualTexts": Array [
- "家具",
+ "数量数量数量数",
+ "量数量数量数量",
+ "数量数量数量...",
],
- "originalText": "家具",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render three max text lines 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render three max text lines 5`] = `
+Array [
Object {
- "actualText": "家具",
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "家具",
+ "1",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 61,
"multiLineActualTexts": Array [
- "家具",
+ "2",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "3",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "家具",
+ "3",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "4",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "5",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "家具",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "家具",
+ "6",
],
- "originalText": "家具",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 49,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "办公用品",
+ "7",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 49,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "办公用品",
+ "8",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 49,
+ "actualTextWidth": 7,
"height": 30,
"multiLineActualTexts": Array [
- "办公用品",
+ "9",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "办公用品",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 49,
+ "actualTextWidth": 14,
"height": 30,
"multiLineActualTexts": Array [
- "办公用品",
+ "10",
],
- "originalText": "办公用品",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
Object {
- "actualText": "桌子",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "桌子",
+ "浙江省",
],
- "originalText": "桌子",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "桌子桌子桌子...",
- "actualTextHeight": 15,
- "actualTextWidth": 83,
- "height": 30,
+ "actualText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "桌子桌子桌子...",
+ "浙江省浙江省浙",
+ "江省浙江省浙江",
+ "省浙江省浙江...",
],
- "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
"width": 103.8,
},
Object {
- "actualText": "桌子",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "桌子",
+ "浙江省",
],
- "originalText": "桌子",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "桌子",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "桌子",
+ "浙江省",
],
- "originalText": "桌子",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "桌子",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "桌子",
+ "浙江省",
],
- "originalText": "桌子",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "沙发",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "浙江省",
],
- "originalText": "沙发",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "沙发",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "浙江省",
],
- "originalText": "沙发",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "沙发",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "浙江省",
],
- "originalText": "沙发",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "沙发",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 25,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "沙发",
+ "浙江省",
],
- "originalText": "沙发",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "浙江省",
"actualTextHeight": 15,
- "actualTextWidth": 13,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "浙江省",
],
- "originalText": "笔",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "绍兴市",
],
- "originalText": "笔",
+ "originalText": "绍兴市",
"width": 103.8,
},
Object {
- "actualText": "笔",
- "actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "笔",
+ "杭州市杭州市杭",
+ "州市杭州市杭州",
+ "市杭州市杭州...",
],
- "originalText": "笔",
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 30,
+ "actualTextWidth": 37,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "绍兴市",
],
- "originalText": "笔",
+ "originalText": "绍兴市",
"width": 103.8,
},
Object {
- "actualText": "23672367236...",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 84,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "23672367236...",
+ "宁波市",
],
- "originalText": "236723672361111",
+ "originalText": "宁波市",
"width": 103.8,
},
Object {
- "actualText": "77897789778...",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 84,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "77897789778...",
+ "舟山市",
],
- "originalText": "7789778977897789778977897789",
+ "originalText": "舟山市",
"width": 103.8,
},
Object {
- "actualText": "23672367236...",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 84,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "23672367236...",
+ "杭州市",
],
- "originalText": "236723672361111",
+ "originalText": "杭州市",
"width": 103.8,
},
Object {
- "actualText": "3877",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "3877",
+ "绍兴市",
],
- "originalText": "3877",
+ "originalText": "绍兴市",
"width": 103.8,
},
Object {
- "actualText": "4342",
+ "actualText": "宁波市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "4342",
+ "宁波市",
],
- "originalText": "4342",
+ "originalText": "宁波市",
"width": 103.8,
},
Object {
- "actualText": "5343",
+ "actualText": "舟山市",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "5343",
+ "舟山市",
],
- "originalText": "5343",
+ "originalText": "舟山市",
"width": 103.8,
},
Object {
- "actualText": "632",
+ "actualText": "杭州市",
"actualTextHeight": 15,
- "actualTextWidth": 21,
+ "actualTextWidth": 37,
"height": 30,
"multiLineActualTexts": Array [
- "632",
+ "杭州市",
],
- "originalText": "632",
+ "originalText": "杭州市",
"width": 103.8,
},
Object {
- "actualText": "7234",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "7234",
+ "家具",
],
- "originalText": "7234",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "834",
- "actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualText": "家具家具家具家具家具家具家具家具家具家具...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "834",
+ "家具家具家具家",
+ "具家具家具家具",
+ "家具家具家具...",
],
- "originalText": "834",
+ "originalText": "家具家具家具家具家具家具家具家具家具家具家具家具家具家具",
"width": 103.8,
},
Object {
- "actualText": "945",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 21,
- "height": 30,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "945",
+ "家具",
],
- "originalText": "945",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "1304",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "1304",
+ "家具",
],
- "originalText": "1304",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "1145",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 26,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "1145",
+ "家具",
],
- "originalText": "1145",
+ "originalText": "家具",
"width": 103.8,
},
Object {
- "actualText": "1432",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 27,
+ "actualTextWidth": 25,
"height": 30,
"multiLineActualTexts": Array [
- "1432",
+ "家具",
],
- "originalText": "1432",
+ "originalText": "家具",
"width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 1`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
+ "actualText": "家具",
+ "actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 40,
+ "height": 30,
"multiLineActualTexts": Array [
- "序号",
+ "家具",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 2`] = `
-Array [
Object {
- "actualText": "1",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "1",
+ "家具",
],
- "originalText": "1",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "2",
+ "actualText": "家具",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "2",
+ "家具",
],
- "originalText": "2",
- "width": 80,
+ "originalText": "家具",
+ "width": 103.8,
},
Object {
- "actualText": "3",
+ "actualText": "办公用品",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 49,
+ "height": 30,
"multiLineActualTexts": Array [
- "3",
+ "办公用品",
],
- "originalText": "3",
- "width": 80,
+ "originalText": "办公用品",
+ "width": 103.8,
},
Object {
- "actualText": "4",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "4",
+ "桌子",
],
- "originalText": "4",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "5",
- "actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子...",
+ "actualTextHeight": 45,
+ "actualTextWidth": 253,
+ "height": 61,
"multiLineActualTexts": Array [
- "5",
+ "桌子桌子桌子桌",
+ "子桌子桌子桌子",
+ "桌子桌子桌子...",
],
- "originalText": "5",
- "width": 80,
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
+ "width": 103.8,
},
Object {
- "actualText": "6",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "6",
+ "桌子",
],
- "originalText": "6",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "7",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "7",
+ "桌子",
],
- "originalText": "7",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "8",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "8",
+ "桌子",
],
- "originalText": "8",
- "width": 80,
+ "originalText": "桌子",
+ "width": 103.8,
},
Object {
- "actualText": "9",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 7,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "9",
+ "沙发",
],
- "originalText": "9",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "10",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "10",
+ "沙发",
],
- "originalText": "10",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "11",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "11",
+ "沙发",
],
- "originalText": "11",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "12",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "12",
+ "沙发",
],
- "originalText": "12",
- "width": 80,
+ "originalText": "沙发",
+ "width": 103.8,
},
Object {
- "actualText": "13",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualTextWidth": 13,
+ "height": 30,
"multiLineActualTexts": Array [
- "13",
+ "笔",
],
- "originalText": "13",
- "width": 80,
+ "originalText": "笔",
+ "width": 103.8,
},
Object {
- "actualText": "14",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "14",
+ "2367236723611",
+ "11",
],
- "originalText": "14",
- "width": 80,
+ "originalText": "236723672361111",
+ "width": 103.8,
},
Object {
- "actualText": "15",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "7789778977897789778977897789",
+ "actualTextHeight": 45,
+ "actualTextWidth": 189,
+ "height": 61,
"multiLineActualTexts": Array [
- "15",
+ "7789778977897",
+ "7897789778977",
+ "89",
],
- "originalText": "15",
- "width": 80,
+ "originalText": "7789778977897789778977897789",
+ "width": 103.8,
},
Object {
- "actualText": "16",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "236723672361111",
+ "actualTextHeight": 30,
+ "actualTextWidth": 100,
+ "height": 46,
"multiLineActualTexts": Array [
- "16",
+ "2367236723611",
+ "11",
],
- "originalText": "16",
- "width": 80,
+ "originalText": "236723672361111",
+ "width": 103.8,
},
Object {
- "actualText": "17",
+ "actualText": "3877",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualTextWidth": 27,
+ "height": 30,
"multiLineActualTexts": Array [
- "17",
+ "3877",
],
- "originalText": "17",
- "width": 80,
+ "originalText": "3877",
+ "width": 103.8,
},
Object {
- "actualText": "18",
+ "actualText": "4342",
"actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualTextWidth": 27,
+ "height": 30,
"multiLineActualTexts": Array [
- "18",
+ "4342",
],
- "originalText": "18",
- "width": 80,
+ "originalText": "4342",
+ "width": 103.8,
},
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 3`] = `
-Array [
Object {
- "actualText": "序号",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
+ "actualText": "5343",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
"multiLineActualTexts": Array [
- "序号",
+ "5343",
],
- "originalText": "序号",
- "width": 80,
+ "originalText": "5343",
+ "width": 103.8,
},
Object {
- "actualText": "省份",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 40,
+ "actualText": "632",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
"multiLineActualTexts": Array [
- "省份",
+ "632",
],
- "originalText": "省份",
+ "originalText": "632",
"width": 103.8,
},
Object {
- "actualText": "城市城市城市城市城市城市城...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 40,
+ "actualText": "7234",
+ "actualTextHeight": 15,
+ "actualTextWidth": 27,
+ "height": 30,
"multiLineActualTexts": Array [
- "城市城市城市城",
- "市城市城市城...",
+ "7234",
],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "originalText": "7234",
"width": 103.8,
},
Object {
- "actualText": "类别类别类别类别类别类别类...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 40,
+ "actualText": "834",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
"multiLineActualTexts": Array [
- "类别类别类别类",
- "别类别类别类...",
+ "834",
],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "originalText": "834",
"width": 103.8,
},
Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 40,
+ "actualText": "945",
+ "actualTextHeight": 15,
+ "actualTextWidth": 21,
+ "height": 30,
"multiLineActualTexts": Array [
- "子类别",
+ "945",
],
- "originalText": "子类别",
+ "originalText": "945",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render two max text lines 1`] = `
+Array [
Object {
- "actualText": "数量数量数量数量数量数量数...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
"height": 40,
"multiLineActualTexts": Array [
- "数量数量数量数",
- "量数量数量数...",
+ "序号",
],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
- "width": 103.8,
+ "originalText": "序号",
+ "width": 80,
},
]
`;
-exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 4`] = `Array []`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should force adaptive adjust cell height if custom cell style less than actual text height 5`] = `
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render two max text lines 2`] = `
Array [
Object {
"actualText": "1",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"1",
],
@@ -6288,7 +11751,7 @@ Array [
"actualText": "2",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"2",
],
@@ -6299,7 +11762,7 @@ Array [
"actualText": "3",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"3",
],
@@ -6310,7 +11773,7 @@ Array [
"actualText": "4",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"4",
],
@@ -6321,7 +11784,7 @@ Array [
"actualText": "5",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"5",
],
@@ -6332,7 +11795,7 @@ Array [
"actualText": "6",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"6",
],
@@ -6343,7 +11806,7 @@ Array [
"actualText": "7",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"7",
],
@@ -6354,7 +11817,7 @@ Array [
"actualText": "8",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"8",
],
@@ -6365,7 +11828,7 @@ Array [
"actualText": "9",
"actualTextHeight": 15,
"actualTextWidth": 7,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"9",
],
@@ -6376,7 +11839,7 @@ Array [
"actualText": "10",
"actualTextHeight": 15,
"actualTextWidth": 14,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"10",
],
@@ -6387,239 +11850,220 @@ Array [
"actualText": "11",
"actualTextHeight": 15,
"actualTextWidth": 13,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"11",
],
"originalText": "11",
"width": 80,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render two max text lines 3`] = `
+Array [
Object {
- "actualText": "12",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
- "multiLineActualTexts": Array [
- "12",
- ],
- "originalText": "12",
- "width": 80,
- },
- Object {
- "actualText": "13",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
- "multiLineActualTexts": Array [
- "13",
- ],
- "originalText": "13",
- "width": 80,
- },
- Object {
- "actualText": "14",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
- "multiLineActualTexts": Array [
- "14",
- ],
- "originalText": "14",
- "width": 80,
- },
- Object {
- "actualText": "15",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "序号",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
"multiLineActualTexts": Array [
- "15",
+ "序号",
],
- "originalText": "15",
+ "originalText": "序号",
"width": 80,
},
Object {
- "actualText": "16",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "省份",
+ "actualTextHeight": 16,
+ "actualTextWidth": 25,
+ "height": 40,
"multiLineActualTexts": Array [
- "16",
+ "省份",
],
- "originalText": "16",
- "width": 80,
+ "originalText": "省份",
+ "width": 103.8,
},
Object {
- "actualText": "17",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "城市城市城市城市城市城市城...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 40,
"multiLineActualTexts": Array [
- "17",
+ "城市城市城市城",
+ "市城市城市城...",
],
- "originalText": "17",
- "width": 80,
+ "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
+ "width": 103.8,
},
Object {
- "actualText": "18",
- "actualTextHeight": 15,
- "actualTextWidth": 14,
- "height": 20,
+ "actualText": "类别类别类别类别类别类别类...",
+ "actualTextHeight": 32,
+ "actualTextWidth": 168,
+ "height": 40,
"multiLineActualTexts": Array [
- "18",
+ "类别类别类别类",
+ "别类别类别类...",
],
- "originalText": "18",
- "width": 80,
+ "originalText": "类别类别类别类别类别类别类别类别类别类别",
+ "width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
+ "actualText": "子类别",
+ "actualTextHeight": 16,
"actualTextWidth": 37,
- "height": 20,
+ "height": 40,
"multiLineActualTexts": Array [
- "浙江省",
+ "子类别",
],
- "originalText": "浙江省",
+ "originalText": "子类别",
"width": 103.8,
},
Object {
- "actualText": "浙江省浙江省浙江省浙江省浙...",
- "actualTextHeight": 30,
+ "actualText": "数量数量数量数量数量数量数...",
+ "actualTextHeight": 32,
"actualTextWidth": 168,
- "height": 20,
+ "height": 40,
"multiLineActualTexts": Array [
- "浙江省浙江省浙",
- "江省浙江省浙...",
+ "数量数量数量数",
+ "量数量数量数...",
],
- "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
+ "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
"width": 103.8,
},
+]
+`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render two max text lines 4`] = `Array []`;
+
+exports[`SpreadSheet Multi Line Text Tests TableSheet should render two max text lines 5`] = `
+Array [
Object {
- "actualText": "浙江省",
+ "actualText": "1",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "1",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "1",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "2",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "2",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "2",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "3",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "3",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "3",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "4",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "4",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "4",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "5",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "5",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "5",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "6",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "6",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "6",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "7",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "7",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "7",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "8",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "8",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "8",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "9",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 7,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "9",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "9",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "10",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 14,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "10",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "10",
+ "width": 80,
},
Object {
- "actualText": "浙江省",
+ "actualText": "11",
"actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualTextWidth": 13,
+ "height": 30,
"multiLineActualTexts": Array [
- "浙江省",
+ "11",
],
- "originalText": "浙江省",
- "width": 103.8,
+ "originalText": "11",
+ "width": 80,
},
Object {
"actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"浙江省",
],
@@ -6627,21 +12071,22 @@ Array [
"width": 103.8,
},
Object {
- "actualText": "浙江省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualText": "浙江省浙江省浙江省浙江省浙...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
"multiLineActualTexts": Array [
- "浙江省",
+ "浙江省浙江省浙",
+ "江省浙江省浙...",
],
- "originalText": "浙江省",
+ "originalText": "浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省浙江省",
"width": 103.8,
},
Object {
"actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"浙江省",
],
@@ -6652,7 +12097,7 @@ Array [
"actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"浙江省",
],
@@ -6660,132 +12105,110 @@ Array [
"width": 103.8,
},
Object {
- "actualText": "四川省",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
- "multiLineActualTexts": Array [
- "四川省",
- ],
- "originalText": "四川省",
- "width": 103.8,
- },
- Object {
- "actualText": "绍兴市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
- "multiLineActualTexts": Array [
- "绍兴市",
- ],
- "originalText": "绍兴市",
- "width": 103.8,
- },
- Object {
- "actualText": "杭州市杭州市杭州市杭州市杭...",
- "actualTextHeight": 30,
- "actualTextWidth": 168,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "杭州市杭州市杭",
- "州市杭州市杭...",
+ "浙江省",
],
- "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "绍兴市",
+ "浙江省",
],
- "originalText": "绍兴市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "宁波市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "宁波市",
+ "浙江省",
],
- "originalText": "宁波市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "舟山市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "舟山市",
+ "浙江省",
],
- "originalText": "舟山市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "杭州市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "杭州市",
+ "浙江省",
],
- "originalText": "杭州市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "绍兴市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "绍兴市",
+ "浙江省",
],
- "originalText": "绍兴市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "宁波市",
+ "actualText": "浙江省",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "宁波市",
+ "浙江省",
],
- "originalText": "宁波市",
+ "originalText": "浙江省",
"width": 103.8,
},
Object {
- "actualText": "舟山市",
+ "actualText": "绍兴市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
- "舟山市",
+ "绍兴市",
],
- "originalText": "舟山市",
+ "originalText": "绍兴市",
"width": 103.8,
},
Object {
- "actualText": "杭州市",
- "actualTextHeight": 15,
- "actualTextWidth": 37,
- "height": 20,
+ "actualText": "杭州市杭州市杭州市杭州市杭...",
+ "actualTextHeight": 30,
+ "actualTextWidth": 168,
+ "height": 46,
"multiLineActualTexts": Array [
- "杭州市",
+ "杭州市杭州市杭",
+ "州市杭州市杭...",
],
- "originalText": "杭州市",
+ "originalText": "杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市杭州市",
"width": 103.8,
},
Object {
"actualText": "绍兴市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"绍兴市",
],
@@ -6796,7 +12219,7 @@ Array [
"actualText": "宁波市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"宁波市",
],
@@ -6807,7 +12230,7 @@ Array [
"actualText": "舟山市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"舟山市",
],
@@ -6818,7 +12241,7 @@ Array [
"actualText": "杭州市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"杭州市",
],
@@ -6829,7 +12252,7 @@ Array [
"actualText": "绍兴市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"绍兴市",
],
@@ -6840,7 +12263,7 @@ Array [
"actualText": "宁波市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"宁波市",
],
@@ -6851,7 +12274,7 @@ Array [
"actualText": "舟山市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"舟山市",
],
@@ -6859,21 +12282,32 @@ Array [
"width": 103.8,
},
Object {
- "actualText": "成都市",
+ "actualText": "杭州市",
"actualTextHeight": 15,
"actualTextWidth": 37,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "成都市",
+ "杭州市",
],
- "originalText": "成都市",
+ "originalText": "杭州市",
+ "width": 103.8,
+ },
+ Object {
+ "actualText": "绍兴市",
+ "actualTextHeight": 15,
+ "actualTextWidth": 37,
+ "height": 30,
+ "multiLineActualTexts": Array [
+ "绍兴市",
+ ],
+ "originalText": "绍兴市",
"width": 103.8,
},
Object {
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"家具",
],
@@ -6884,7 +12318,7 @@ Array [
"actualText": "家具家具家具家具家具家具家...",
"actualTextHeight": 30,
"actualTextWidth": 168,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"家具家具家具家",
"具家具家具家...",
@@ -6896,7 +12330,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"家具",
],
@@ -6907,7 +12341,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6918,7 +12352,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6929,7 +12363,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6940,7 +12374,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6951,7 +12385,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6962,7 +12396,7 @@ Array [
"actualText": "家具",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"家具",
],
@@ -6973,73 +12407,7 @@ Array [
"actualText": "办公用品",
"actualTextHeight": 15,
"actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
- "multiLineActualTexts": Array [
- "办公用品",
- ],
- "originalText": "办公用品",
- "width": 103.8,
- },
- Object {
- "actualText": "办公用品",
- "actualTextHeight": 15,
- "actualTextWidth": 49,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"办公用品",
],
@@ -7050,29 +12418,18 @@ Array [
"actualText": "办公用品",
"actualTextHeight": 15,
"actualTextWidth": 49,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"办公用品",
],
"originalText": "办公用品",
"width": 103.8,
},
- Object {
- "actualText": "家具",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "家具",
- ],
- "originalText": "家具",
- "width": 103.8,
- },
Object {
"actualText": "桌子",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"桌子",
],
@@ -7083,195 +12440,118 @@ Array [
"actualText": "桌子桌子桌子桌子桌子桌子桌...",
"actualTextHeight": 30,
"actualTextWidth": 168,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"桌子桌子桌子桌",
- "子桌子桌子桌...",
- ],
- "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
- "width": 103.8,
- },
- Object {
- "actualText": "桌子",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "桌子",
- ],
- "originalText": "桌子",
- "width": 103.8,
- },
- Object {
- "actualText": "桌子",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "桌子",
- ],
- "originalText": "桌子",
- "width": 103.8,
- },
- Object {
- "actualText": "桌子",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "桌子",
- ],
- "originalText": "桌子",
- "width": 103.8,
- },
- Object {
- "actualText": "沙发",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "沙发",
- ],
- "originalText": "沙发",
- "width": 103.8,
- },
- Object {
- "actualText": "沙发",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "沙发",
- ],
- "originalText": "沙发",
- "width": 103.8,
- },
- Object {
- "actualText": "沙发",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "沙发",
- ],
- "originalText": "沙发",
- "width": 103.8,
- },
- Object {
- "actualText": "沙发",
- "actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
- "multiLineActualTexts": Array [
- "沙发",
+ "子桌子桌子桌...",
],
- "originalText": "沙发",
+ "originalText": "桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子桌子",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 46,
"multiLineActualTexts": Array [
- "笔",
+ "桌子",
],
- "originalText": "笔",
+ "originalText": "桌子",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "桌子",
],
- "originalText": "笔",
+ "originalText": "桌子",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "桌子",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "桌子",
],
- "originalText": "笔",
+ "originalText": "桌子",
"width": 103.8,
},
Object {
- "actualText": "笔",
+ "actualText": "沙发",
"actualTextHeight": 15,
- "actualTextWidth": 13,
- "height": 20,
+ "actualTextWidth": 25,
+ "height": 30,
"multiLineActualTexts": Array [
- "笔",
+ "沙发",
],
- "originalText": "笔",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "纸张",
+ "actualText": "沙发",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "纸张",
+ "沙发",
],
- "originalText": "纸张",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "纸张",
+ "actualText": "沙发",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "纸张",
+ "沙发",
],
- "originalText": "纸张",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "纸张",
+ "actualText": "沙发",
"actualTextHeight": 15,
"actualTextWidth": 25,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
- "纸张",
+ "沙发",
],
- "originalText": "纸张",
+ "originalText": "沙发",
"width": 103.8,
},
Object {
- "actualText": "纸张",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
+ "actualTextWidth": 13,
+ "height": 30,
"multiLineActualTexts": Array [
- "纸张",
+ "笔",
],
- "originalText": "纸张",
+ "originalText": "笔",
"width": 103.8,
},
Object {
- "actualText": "桌子",
+ "actualText": "笔",
"actualTextHeight": 15,
- "actualTextWidth": 25,
- "height": 20,
+ "actualTextWidth": 13,
+ "height": 30,
"multiLineActualTexts": Array [
- "桌子",
+ "笔",
],
- "originalText": "桌子",
+ "originalText": "笔",
"width": 103.8,
},
Object {
"actualText": "236723672361111",
"actualTextHeight": 30,
"actualTextWidth": 100,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"2367236723611",
"11",
@@ -7283,7 +12563,7 @@ Array [
"actualText": "778977897789778977897789...",
"actualTextHeight": 30,
"actualTextWidth": 172,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"7789778977897",
"78977897789...",
@@ -7295,7 +12575,7 @@ Array [
"actualText": "236723672361111",
"actualTextHeight": 30,
"actualTextWidth": 100,
- "height": 20,
+ "height": 46,
"multiLineActualTexts": Array [
"2367236723611",
"11",
@@ -7307,7 +12587,7 @@ Array [
"actualText": "3877",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"3877",
],
@@ -7318,7 +12598,7 @@ Array [
"actualText": "4342",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"4342",
],
@@ -7329,7 +12609,7 @@ Array [
"actualText": "5343",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"5343",
],
@@ -7340,7 +12620,7 @@ Array [
"actualText": "632",
"actualTextHeight": 15,
"actualTextWidth": 21,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"632",
],
@@ -7351,7 +12631,7 @@ Array [
"actualText": "7234",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"7234",
],
@@ -7362,7 +12642,7 @@ Array [
"actualText": "834",
"actualTextHeight": 15,
"actualTextWidth": 21,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"834",
],
@@ -7373,7 +12653,7 @@ Array [
"actualText": "945",
"actualTextHeight": 15,
"actualTextWidth": 21,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"945",
],
@@ -7384,163 +12664,12 @@ Array [
"actualText": "1304",
"actualTextHeight": 15,
"actualTextWidth": 27,
- "height": 20,
+ "height": 30,
"multiLineActualTexts": Array [
"1304",
],
"originalText": "1304",
"width": 103.8,
},
- Object {
- "actualText": "1145",
- "actualTextHeight": 15,
- "actualTextWidth": 26,
- "height": 20,
- "multiLineActualTexts": Array [
- "1145",
- ],
- "originalText": "1145",
- "width": 103.8,
- },
- Object {
- "actualText": "1432",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1432",
- ],
- "originalText": "1432",
- "width": 103.8,
- },
- Object {
- "actualText": "1343",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1343",
- ],
- "originalText": "1343",
- "width": 103.8,
- },
- Object {
- "actualText": "1354",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1354",
- ],
- "originalText": "1354",
- "width": 103.8,
- },
- Object {
- "actualText": "1523",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1523",
- ],
- "originalText": "1523",
- "width": 103.8,
- },
- Object {
- "actualText": "1634",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1634",
- ],
- "originalText": "1634",
- "width": 103.8,
- },
- Object {
- "actualText": "1723",
- "actualTextHeight": 15,
- "actualTextWidth": 27,
- "height": 20,
- "multiLineActualTexts": Array [
- "1723",
- ],
- "originalText": "1723",
- "width": 103.8,
- },
-]
-`;
-
-exports[`SpreadSheet Multi Line Text Tests TableSheet should not adaptive adjust cell height if custom cell style more than actual text height 1`] = `
-Array [
- Object {
- "actualText": "序号",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 70,
- "multiLineActualTexts": Array [
- "序号",
- ],
- "originalText": "序号",
- "width": 80,
- },
- Object {
- "actualText": "省份",
- "actualTextHeight": 16,
- "actualTextWidth": 25,
- "height": 70,
- "multiLineActualTexts": Array [
- "省份",
- ],
- "originalText": "省份",
- "width": 103.8,
- },
- Object {
- "actualText": "城市城市城市城市城市城市城...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 70,
- "multiLineActualTexts": Array [
- "城市城市城市城",
- "市城市城市城...",
- ],
- "originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
- "width": 103.8,
- },
- Object {
- "actualText": "类别类别类别类别类别类别类...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 70,
- "multiLineActualTexts": Array [
- "类别类别类别类",
- "别类别类别类...",
- ],
- "originalText": "类别类别类别类别类别类别类别类别类别类别",
- "width": 103.8,
- },
- Object {
- "actualText": "子类别",
- "actualTextHeight": 16,
- "actualTextWidth": 37,
- "height": 70,
- "multiLineActualTexts": Array [
- "子类别",
- ],
- "originalText": "子类别",
- "width": 103.8,
- },
- Object {
- "actualText": "数量数量数量数量数量数量数...",
- "actualTextHeight": 32,
- "actualTextWidth": 168,
- "height": 70,
- "multiLineActualTexts": Array [
- "数量数量数量数",
- "量数量数量数...",
- ],
- "originalText": "数量数量数量数量数量数量数量数量数量数量数量",
- "width": 103.8,
- },
]
`;
diff --git a/packages/s2-core/__tests__/spreadsheet/multi-line-text-spec.ts b/packages/s2-core/__tests__/spreadsheet/multi-line-text-spec.ts
index 27b41720bc..e8786a30fa 100644
--- a/packages/s2-core/__tests__/spreadsheet/multi-line-text-spec.ts
+++ b/packages/s2-core/__tests__/spreadsheet/multi-line-text-spec.ts
@@ -1,5 +1,6 @@
/* eslint-disable jest/expect-expect */
import { getContainer } from 'tests/util/helpers';
+import { range } from 'lodash';
import { PivotSheet, TableSheet, type SpreadSheet } from '../../src';
import type {
CellTextWordWrapStyle,
@@ -47,7 +48,25 @@ describe('SpreadSheet Multi Line Text Tests', () => {
});
};
- const expectHierarchyHeight = (
+ const expectRowHierarchyHeight = (
+ height: number,
+ lastLevelY: number = 0,
+ lastLevelHeight: number = 30,
+ sampleNodesForAllLevelsTotals = 2,
+ ) => {
+ const { rowsHierarchy } = s2.facet.getLayoutResult();
+
+ expect(rowsHierarchy.height).toEqual(height);
+ expect(rowsHierarchy.sampleNodesForAllLevels).toHaveLength(
+ sampleNodesForAllLevelsTotals,
+ );
+ expect(rowsHierarchy.sampleNodeForLastLevel?.y).toEqual(lastLevelY);
+ expect(rowsHierarchy.sampleNodeForLastLevel?.height).toEqual(
+ lastLevelHeight,
+ );
+ };
+
+ const expectColHierarchyHeight = (
height: number,
lastLevelY: number = 60,
lastLevelHeight: number = 30,
@@ -122,20 +141,20 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(90);
+ expectColHierarchyHeight(90);
});
- test('should custom two max text lines', async () => {
+ test('should render two max text lines', async () => {
updateStyle(2);
await s2.render(false);
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(118, 80, 38);
+ expectColHierarchyHeight(118, 80, 38);
});
- test('should custom three max text lines', async () => {
+ test('should render three max text lines', async () => {
updateStyle(3);
await s2.render(false);
@@ -143,7 +162,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(165, 112, 53);
+ expectColHierarchyHeight(165, 112, 53);
});
test('should render custom text overflow text', async () => {
@@ -166,7 +185,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(90);
+ expectColHierarchyHeight(90);
});
test('should not render word wrap text', async () => {
@@ -193,7 +212,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
expect(cell.getActualText()).not.toContain('...');
});
});
- expectHierarchyHeight(90);
+ expectColHierarchyHeight(90);
});
test('should force adaptive adjust cell height if custom cell style less than actual text height', async () => {
@@ -220,7 +239,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(118, 80, 38);
+ expectColHierarchyHeight(118, 80, 38);
});
test('should not adaptive adjust cell height if custom cell style more than actual text height', async () => {
@@ -256,14 +275,14 @@ describe('SpreadSheet Multi Line Text Tests', () => {
});
});
- expectHierarchyHeight(210, 140, 70);
+ expectColHierarchyHeight(210, 140, 70);
});
test('should render correctly layout if enable totals', async () => {
setupTotalsOptions();
await s2.render(false);
- expectHierarchyHeight(90, 60, 30);
+ expectColHierarchyHeight(90, 60, 30);
});
test('should render correctly layout if enable totals for multiple text lines', async () => {
@@ -271,21 +290,21 @@ describe('SpreadSheet Multi Line Text Tests', () => {
updateStyle(3);
await s2.render(false);
- expectHierarchyHeight(165, 112, 53);
+ expectColHierarchyHeight(165, 112, 53);
});
test('should render correctly layout if only enable grand totals', async () => {
setupTotalsOptions(true, false);
await s2.render(false);
- expectHierarchyHeight(90, 60, 30);
+ expectColHierarchyHeight(90, 60, 30);
});
test('should render correctly layout if only enable sub totals', async () => {
setupTotalsOptions(false, true);
await s2.render(false);
- expectHierarchyHeight(90, 60, 30);
+ expectColHierarchyHeight(90, 60, 30);
});
test('should not adaptive adjust cell height if hidden col cell', async () => {
@@ -303,7 +322,69 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(0, 0, 0);
+ expectColHierarchyHeight(0, 0, 0);
+ });
+
+ // https://github.com/antvis/S2/issues/2594
+ test('should calc correctly row cell height if actual text lines is difference', async () => {
+ updateStyle(4);
+ s2.changeSheetSize(800, 600);
+ s2.setDataCfg({
+ data: [
+ {
+ province:
+ '浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江',
+ city: '杭州杭州杭州杭州',
+ type: '纸张纸张纸张纸张纸张',
+ price: 2,
+ cost: 20,
+ },
+ ...s2.dataCfg.data,
+ ],
+ });
+
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ // 省份 4行文本, 叶子节点 (城市) 3行文本, 省份应该和城市高度一致, 才能展示所有文本 (maxLines: 4)
+ expectRowHierarchyHeight(568, 0, 72);
+ expectColHierarchyHeight(212, 144, 68);
+ });
+
+ test('should render three max text lines for tree mode', async () => {
+ updateStyle(3);
+ s2.setOptions({
+ hierarchyType: 'tree',
+ style: {
+ rowCell: {
+ width: 100,
+ },
+ },
+ });
+ s2.changeSheetSize(800, 600);
+ s2.setDataCfg({
+ data: [
+ {
+ province:
+ '浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江',
+ city: '杭州杭州杭州杭州',
+ type: '纸张纸张纸张纸张纸张',
+ price: 2,
+ cost: 20,
+ },
+ ...s2.dataCfg.data,
+ ],
+ });
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ expect(s2.facet.getLayoutResult().rowsHierarchy.height).toEqual(760);
});
});
@@ -333,20 +414,20 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(30, 0, 30, 1);
+ expectColHierarchyHeight(30, 0, 30, 1);
});
- test('should custom two max text lines', async () => {
+ test('should render two max text lines', async () => {
updateStyle(2);
await s2.render(false);
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(40, 0, 40, 1);
+ expectColHierarchyHeight(40, 0, 40, 1);
});
- test('should custom three max text lines', async () => {
+ test('should render three max text lines', async () => {
updateStyle(3);
await s2.render(false);
@@ -354,7 +435,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(56, 0, 56, 1);
+ expectColHierarchyHeight(56, 0, 56, 1);
});
test('should force adaptive adjust cell height if custom cell style less than actual text height', async () => {
@@ -375,7 +456,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
getCells().forEach((cells) => {
expect(mapCells(cells)).toMatchSnapshot();
});
- expectHierarchyHeight(40, 0, 40, 1);
+ expectColHierarchyHeight(40, 0, 40, 1);
});
test('should not adaptive adjust cell height if custom cell style more than actual text height', async () => {
@@ -400,10 +481,107 @@ describe('SpreadSheet Multi Line Text Tests', () => {
});
});
- expectHierarchyHeight(70, 0, 70, 1);
+ expectColHierarchyHeight(70, 0, 70, 1);
+ });
+
+ test('should calc correctly col cell height if actual text lines is difference', async () => {
+ updateStyle(4);
+ s2.setDataCfg({
+ meta: [
+ {
+ field: 'province',
+ name: '省份'.repeat(20),
+ },
+ ],
+ });
+
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ expectColHierarchyHeight(72, 0, 72, 1);
+ });
+
+ // https://github.com/antvis/S2/issues/2594
+ test('should calc correctly data cell height if actual text lines is difference', async () => {
+ updateStyle(4);
+
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ const rowDataCells = s2.facet
+ .getDataCells()
+ .filter((cell) => cell.getMeta().rowIndex === 1);
+
+ expect(
+ rowDataCells.every((cell) => cell.getMeta().height === 76),
+ ).toBeTruthy();
+ });
+
+ test('should force adaptive adjust row height if custom cell style less than actual text height', async () => {
+ updateStyle(3);
+
+ s2.setOptions({
+ style: {
+ rowCell: {
+ heightByField: {
+ 1: 20,
+ },
+ },
+ },
+ });
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ const rowDataCells = s2.facet
+ .getDataCells()
+ .filter((cell) => cell.getMeta().rowIndex === 1);
+
+ expect(
+ rowDataCells.every((cell) => cell.getMeta().height === 61),
+ ).toBeTruthy();
+ });
+
+ test('should calc correctly row cell height if actual text lines is difference', async () => {
+ updateStyle(4);
+ s2.changeSheetSize(800, 600);
+ s2.setDataCfg({
+ data: [
+ {
+ province: '浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江',
+ city: '杭州杭州杭州杭州',
+ type: '纸张纸张纸张纸张纸张',
+ price: 2,
+ cost: 20,
+ },
+ ...s2.dataCfg.data,
+ ],
+ });
+
+ await s2.render();
+
+ getCells().forEach((cells) => {
+ expect(mapCells(cells)).toMatchSnapshot();
+ });
+
+ const rowDataCells = s2.facet
+ .getDataCells()
+ .filter((cell) => cell.getMeta().rowIndex === 0);
+
+ expect(
+ rowDataCells.every((cell) => cell.getMeta().height === 46),
+ ).toBeTruthy();
});
- test.skip.each([1, 2, 3, 4, 5])(
+ test.skip.each(range(1, 6))(
'should always render default cell height when set %s line, but actual text not wrap',
async (maxLines) => {
updateStyle(maxLines);
@@ -411,7 +589,7 @@ describe('SpreadSheet Multi Line Text Tests', () => {
s2.setDataCfg(SimpleDataCfg);
await s2.render();
- expectHierarchyHeight(30, 0, 30, 1);
+ expectColHierarchyHeight(30, 0, 30, 1);
},
);
});
diff --git a/packages/s2-core/__tests__/unit/data-process/pivot-spec.tsx b/packages/s2-core/__tests__/unit/data-process/pivot-spec.tsx
index 8c5f61e590..46aad739bd 100644
--- a/packages/s2-core/__tests__/unit/data-process/pivot-spec.tsx
+++ b/packages/s2-core/__tests__/unit/data-process/pivot-spec.tsx
@@ -329,30 +329,29 @@ describe('Pivot Table Core Data Process', () => {
describe('4、Calculate data cell info', () => {
test('should get correct data value', () => {
- const { getCellMeta } = s2.facet;
const getData = (meta: ViewMeta | null) =>
(meta?.data as CellData)?.[VALUE_FIELD];
// 左上角
- expect(getData(getCellMeta(0, 0))).toBe(7789);
- expect(getData(getCellMeta(1, 0))).toBe(2367);
- expect(getData(getCellMeta(0, 1))).toBe(5343);
- expect(getData(getCellMeta(1, 1))).toBe(632);
+ expect(getData(s2.facet.getCellMeta(0, 0))).toBe(7789);
+ expect(getData(s2.facet.getCellMeta(1, 0))).toBe(2367);
+ expect(getData(s2.facet.getCellMeta(0, 1))).toBe(5343);
+ expect(getData(s2.facet.getCellMeta(1, 1))).toBe(632);
// 右下角
- expect(getData(getCellMeta(7, 3))).toBe(352);
- expect(getData(getCellMeta(7, 2))).toBe(2458);
- expect(getData(getCellMeta(6, 3))).toBe(3551);
- expect(getData(getCellMeta(6, 2))).toBe(2457);
+ expect(getData(s2.facet.getCellMeta(7, 3))).toBe(352);
+ expect(getData(s2.facet.getCellMeta(7, 2))).toBe(2458);
+ expect(getData(s2.facet.getCellMeta(6, 3))).toBe(3551);
+ expect(getData(s2.facet.getCellMeta(6, 2))).toBe(2457);
// 右上角
- expect(getData(getCellMeta(0, 3))).toBe(1343);
- expect(getData(getCellMeta(0, 2))).toBe(945);
- expect(getData(getCellMeta(1, 3))).toBe(1354);
- expect(getData(getCellMeta(1, 2))).toBe(1304);
+ expect(getData(s2.facet.getCellMeta(0, 3))).toBe(1343);
+ expect(getData(s2.facet.getCellMeta(0, 2))).toBe(945);
+ expect(getData(s2.facet.getCellMeta(1, 3))).toBe(1354);
+ expect(getData(s2.facet.getCellMeta(1, 2))).toBe(1304);
// 左下角
- expect(getData(getCellMeta(7, 0))).toBe(2330);
- expect(getData(getCellMeta(7, 1))).toBe(2445);
- expect(getData(getCellMeta(6, 0))).toBe(1943);
- expect(getData(getCellMeta(6, 1))).toBe(2333);
+ expect(getData(s2.facet.getCellMeta(7, 0))).toBe(2330);
+ expect(getData(s2.facet.getCellMeta(7, 1))).toBe(2445);
+ expect(getData(s2.facet.getCellMeta(6, 0))).toBe(1943);
+ expect(getData(s2.facet.getCellMeta(6, 1))).toBe(2333);
});
});
});
diff --git a/packages/s2-core/__tests__/unit/data-process/table-spec.tsx b/packages/s2-core/__tests__/unit/data-process/table-spec.tsx
index d547dcd2cb..547cec9ed5 100644
--- a/packages/s2-core/__tests__/unit/data-process/table-spec.tsx
+++ b/packages/s2-core/__tests__/unit/data-process/table-spec.tsx
@@ -54,20 +54,18 @@ describe('List Table Core Data Process', () => {
describe('2、Calculate overlapped data cell info', () => {
test('should get correct data value', () => {
- const { getCellMeta } = s2.facet;
-
// 第一行
- expect(getCellMeta(0, 0)!.data).toEqual({ province: '浙江省' });
- expect(getCellMeta(0, 1)!.data).toEqual({ city: '杭州市' });
- expect(getCellMeta(0, 2)!.data).toEqual({ type: '家具' });
- expect(getCellMeta(0, 3)!.data).toEqual({ sub_type: '桌子' });
- expect(getCellMeta(0, 4)!.data).toEqual({ number: 7789 });
+ expect(s2.facet.getCellMeta(0, 0)!.data).toEqual({ province: '浙江省' });
+ expect(s2.facet.getCellMeta(0, 1)!.data).toEqual({ city: '杭州市' });
+ expect(s2.facet.getCellMeta(0, 2)!.data).toEqual({ type: '家具' });
+ expect(s2.facet.getCellMeta(0, 3)!.data).toEqual({ sub_type: '桌子' });
+ expect(s2.facet.getCellMeta(0, 4)!.data).toEqual({ number: 7789 });
// 第三行
- expect(getCellMeta(2, 0)!.data).toEqual({ province: '浙江省' });
- expect(getCellMeta(2, 1)!.data).toEqual({ city: '宁波市' });
- expect(getCellMeta(2, 2)!.data).toEqual({ type: '家具' });
- expect(getCellMeta(2, 3)!.data).toEqual({ sub_type: '桌子' });
- expect(getCellMeta(2, 4)!.data).toEqual({ number: 3877 });
+ expect(s2.facet.getCellMeta(2, 0)!.data).toEqual({ province: '浙江省' });
+ expect(s2.facet.getCellMeta(2, 1)!.data).toEqual({ city: '宁波市' });
+ expect(s2.facet.getCellMeta(2, 2)!.data).toEqual({ type: '家具' });
+ expect(s2.facet.getCellMeta(2, 3)!.data).toEqual({ sub_type: '桌子' });
+ expect(s2.facet.getCellMeta(2, 4)!.data).toEqual({ number: 3877 });
});
});
});
diff --git a/packages/s2-core/__tests__/unit/facet/pivot-facet-spec.ts b/packages/s2-core/__tests__/unit/facet/pivot-facet-spec.ts
index e8c87f83da..01cda1e0ac 100644
--- a/packages/s2-core/__tests__/unit/facet/pivot-facet-spec.ts
+++ b/packages/s2-core/__tests__/unit/facet/pivot-facet-spec.ts
@@ -82,7 +82,7 @@ jest.mock('@/sheet-type', () => {
getRowNodes: () => [],
getColNodes: () => [],
getHiddenColumnsInfo: jest.fn(),
- getCellMeta: jest.fn(),
+ getCellMeta: jest.fn().mockRejectedValue({}),
getRowLeafNodeByIndex: () => [],
frozenGroupInfo: {
[FrozenGroupType.FROZEN_ROW]: {},
@@ -230,18 +230,16 @@ describe('Pivot Mode Facet Test', () => {
});
describe('should get correct cell meta', () => {
- const { getCellMeta } = facet;
-
test('should get correct cell meta', () => {
expect(
- (getCellMeta(0, 1)?.data as CellData)?.getValueByField('number'),
+ (facet.getCellMeta(0, 1)?.data as CellData)?.getValueByField('number'),
).toBe(5343);
expect(
- (getCellMeta(1, 1)?.data as CellData)?.getValueByField('number'),
+ (facet.getCellMeta(1, 1)?.data as CellData)?.getValueByField('number'),
).toBe(632);
expect(
- (getCellMeta(1, 0)?.data as CellData)?.getValueByField('number'),
+ (facet.getCellMeta(1, 0)?.data as CellData)?.getValueByField('number'),
).toBe(2367);
});
});
diff --git a/packages/s2-core/__tests__/unit/facet/table-facet-spec.ts b/packages/s2-core/__tests__/unit/facet/table-facet-spec.ts
index 38208e3579..a792e03753 100644
--- a/packages/s2-core/__tests__/unit/facet/table-facet-spec.ts
+++ b/packages/s2-core/__tests__/unit/facet/table-facet-spec.ts
@@ -60,6 +60,7 @@ jest.mock('@/sheet-type', () => {
getHiddenColumnsInfo: jest.fn(),
getColNodeHeight: jest.fn(),
getHeaderNodes: jest.fn().mockReturnValue([]),
+ getCellMeta: jest.fn().mockRejectedValue({}),
},
dataSet: {
isEmpty: jest.fn(),
@@ -426,14 +427,13 @@ describe('Table Mode Facet With Frozen Test', () => {
test('should get correct cell layout with frozenTrailingRow', () => {
const { trailingRowCount } = s2.options.frozen!;
- const { getCellMeta } = facet;
const displayData = s2.dataSet.getDisplayDataSet();
expect(
displayData
.slice(-trailingRowCount!)
.reverse()
- .map((_, idx) => getCellMeta(displayData.length - 1 - idx, 1)!.y),
+ .map((_, idx) => facet.getCellMeta(displayData.length - 1 - idx, 1)!.y),
).toEqual([532, 502]);
});
@@ -709,14 +709,13 @@ describe('Table Mode Facet With Column Grouping Frozen Test', () => {
test('should get correct cell layout with frozenTrailingRow', () => {
const { trailingRowCount } = s2.options.frozen!;
- const { getCellMeta } = facet;
const displayData = s2.dataSet.getDisplayDataSet();
expect(
displayData
.slice(-trailingRowCount!)
.reverse()
- .map((_, idx) => getCellMeta(displayData.length - 1 - idx, 1)!.y),
+ .map((_, idx) => facet.getCellMeta(displayData.length - 1 - idx, 1)!.y),
).toEqual([532, 502]);
});
diff --git a/packages/s2-core/src/facet/base-facet.ts b/packages/s2-core/src/facet/base-facet.ts
index aa39570261..88766cb02a 100644
--- a/packages/s2-core/src/facet/base-facet.ts
+++ b/packages/s2-core/src/facet/base-facet.ts
@@ -28,7 +28,6 @@ import {
ColCell,
CornerCell,
DataCell,
- HeaderCell,
MergedCell,
RowCell,
SeriesNumberCell,
@@ -336,7 +335,7 @@ export abstract class BaseFacet {
return Math.max(defaultHeight, sampleMaxHeight);
}
- protected getCellAdaptiveHeight(cell: HeaderCell, defaultHeight: number) {
+ protected getCellAdaptiveHeight(cell: S2CellType, defaultHeight: number) {
if (!cell) {
return defaultHeight;
}
@@ -1854,7 +1853,7 @@ export abstract class BaseFacet {
* 获取列头叶子节点节点 (含非可视区域)
*/
public getColLeafNodes(): Node[] {
- return this.layoutResult.colLeafNodes || [];
+ return this.layoutResult?.colLeafNodes || [];
}
/**
@@ -1937,7 +1936,7 @@ export abstract class BaseFacet {
* @example 获取全部: facet.getRowLeafNodes()
*/
public getRowLeafNodes(): Node[] {
- return this.layoutResult.rowLeafNodes || [];
+ return this.layoutResult?.rowLeafNodes || [];
}
/**
diff --git a/packages/s2-core/src/facet/frozen-facet.ts b/packages/s2-core/src/facet/frozen-facet.ts
index b7b7343df2..a2b137790d 100644
--- a/packages/s2-core/src/facet/frozen-facet.ts
+++ b/packages/s2-core/src/facet/frozen-facet.ts
@@ -660,14 +660,6 @@ export abstract class FrozenFacet extends BaseFacet {
};
};
- public getCellHeightByRowIndex(rowIndex: number) {
- if (this.rowOffsets) {
- return this.getRowCellHeight({ id: String(rowIndex) } as Node);
- }
-
- return this.getDefaultCellHeight();
- }
-
public getTotalHeightForRange = (start: number, end: number) => {
if (start < 0 || end < 0) {
return 0;
diff --git a/packages/s2-core/src/facet/layout/node.ts b/packages/s2-core/src/facet/layout/node.ts
index 26140d9570..1d0c70e56f 100644
--- a/packages/s2-core/src/facet/layout/node.ts
+++ b/packages/s2-core/src/facet/layout/node.ts
@@ -1,4 +1,4 @@
-import { head, isEmpty, isEqual } from 'lodash';
+import { head, isEmpty } from 'lodash';
import { SERIES_NUMBER_FIELD } from '../../common';
import { ROOT_NODE_ID } from '../../common/constant/node';
import type {
@@ -283,7 +283,6 @@ export class Node {
}
/**
- * Get all children branch in this node branch, eg:
* c1
* b1〈
* c2
@@ -291,34 +290,23 @@ export class Node {
* c3
* b2〈
* c4
- * get all branch [[b1,c1],[b1,c2],[b2,c3],[b2,c4]]
- * @param parent
+ * c1 => (a, b1, c1)
+ * @param node
*/
- public static getAllBranch(parent: Node): Node[][] {
- const all: Node[][] = [];
- const leaves = this.getAllLeaveNodes(parent);
- let current = leaves.shift();
- let tempBranch = [];
-
- while (current) {
- tempBranch.unshift(current);
- let pa = current.parent;
-
- while (pa) {
- if (!isEqual(pa, parent)) {
- tempBranch.unshift(pa);
- } else {
- break;
- }
+ public static getBranchNodes(node: Node): Node[] {
+ if (node && !node.isTotals) {
+ let parent = node.parent;
+ const pathNodes = [node];
- pa = pa.parent;
+ while (parent && parent.id !== ROOT_NODE_ID) {
+ pathNodes.push(parent);
+ parent = parent.parent;
}
- all.push(tempBranch);
- current = leaves.shift();
- tempBranch = [];
+
+ return pathNodes.reverse();
}
- return all;
+ return [];
}
public static blankNode(): Node {
diff --git a/packages/s2-core/src/facet/pivot-facet.ts b/packages/s2-core/src/facet/pivot-facet.ts
index 780bbbb08e..68c70fa5eb 100644
--- a/packages/s2-core/src/facet/pivot-facet.ts
+++ b/packages/s2-core/src/facet/pivot-facet.ts
@@ -9,6 +9,7 @@ import {
keys,
last,
map,
+ max,
maxBy,
merge,
reduce,
@@ -96,7 +97,7 @@ export class PivotFacet extends FrozenFacet {
/**
* 根据行列索引获取单元格元数据
*/
- public getCellMeta = (rowIndex = 0, colIndex = 0) => {
+ public getCellMeta(rowIndex = 0, colIndex = 0) {
const { options, dataSet } = this.spreadsheet;
const { rowLeafNodes, colLeafNodes } = this.getLayoutResult();
const row = rowLeafNodes[rowIndex];
@@ -153,7 +154,7 @@ export class PivotFacet extends FrozenFacet {
};
return options.layoutCellMeta?.(cellMeta) ?? cellMeta;
- };
+ }
private getPreLevelSampleNode(colNode: Node, colsHierarchy: Hierarchy) {
// 之前是采样每一级第一个节点, 现在 sampleNodesForAllLevels 是采样每一级高度最大的节点
@@ -500,7 +501,12 @@ export class PivotFacet extends FrozenFacet {
if (isLeaf) {
// 1. 普通树状结构, 叶子节点各占一行, 2. 自定义树状结构 (平铺模式)
const rowIndex = (preLeafNode?.rowIndex ?? -1) + 1;
- const nodeHeight = this.getRowNodeHeight(currentNode);
+ const currentBranchNodeHeights = Node.getBranchNodes(currentNode).map(
+ (rowNode) => this.getRowNodeHeight(rowNode),
+ );
+ // 父节点的高度是叶子节点的高度之和, 由于存在多行文本, 叶子节点的高度以当前路径下节点高度最大的为准
+ const nodeHeight =
+ max(currentBranchNodeHeights) || this.getRowNodeHeight(currentNode);
currentNode.rowIndex ??= rowIndex;
currentNode.colIndex ??= i;
@@ -569,12 +575,10 @@ export class PivotFacet extends FrozenFacet {
if (prevRowParent !== parent && parent) {
leafNodes.push(parent);
- // parent's y = first child's y
+ // 父节点 y 坐标 = 第一个未隐藏的子节点的 y 坐标
parent.y = parent.children[0].y;
- // parent's height = all children's height
- parent.height = parent.children
- .map((value) => value.height)
- .reduce((sum, current) => sum + current, 0);
+ // 父节点高度 = 所有子节点高度之和
+ parent.height = sumBy(parent.children, 'height');
prevRowParent = parent;
}
}
diff --git a/packages/s2-core/src/facet/table-facet.ts b/packages/s2-core/src/facet/table-facet.ts
index bd004f0132..007f206bc9 100644
--- a/packages/s2-core/src/facet/table-facet.ts
+++ b/packages/s2-core/src/facet/table-facet.ts
@@ -1,5 +1,14 @@
import { Group } from '@antv/g';
-import { isBoolean, isNumber, keys, last, maxBy, set } from 'lodash';
+import {
+ isBoolean,
+ isEmpty,
+ isNumber,
+ keys,
+ last,
+ max,
+ maxBy,
+ set,
+} from 'lodash';
import { TableColCell, TableDataCell, TableSeriesNumberCell } from '../cell';
import {
KEY_GROUP_FROZEN_ROW_RESIZE_AREA,
@@ -31,12 +40,12 @@ import { floor } from '../utils/math';
import { CornerBBox } from './bbox/corner-bbox';
import { FrozenFacet } from './frozen-facet';
import { ColHeader, Frame } from './header';
+import { TableColHeader } from './header/table-col';
import { buildHeaderHierarchy } from './layout/build-header-hierarchy';
import { Hierarchy } from './layout/hierarchy';
import { layoutCoordinate } from './layout/layout-hooks';
import { Node } from './layout/node';
import { getFrozenLeafNodesCount, isFrozenTrailingRow } from './utils';
-import { TableColHeader } from './header/table-col';
export class TableFacet extends FrozenFacet {
public constructor(spreadsheet: SpreadSheet) {
@@ -46,21 +55,72 @@ export class TableFacet extends FrozenFacet {
}
public init() {
- this.initRowOffsets();
super.init();
+ this.initRowOffsets();
+ }
+
+ private getDataCellAdaptiveHeight(viewMeta: ViewMeta): number {
+ const dataCell = new TableDataCell(viewMeta, this.spreadsheet, {
+ shallowRender: true,
+ });
+ const defaultHeight = this.getDefaultCellHeight();
+
+ return this.getCellAdaptiveHeight(dataCell, defaultHeight);
+ }
+
+ private getCellHeightByRowIndex(rowIndex: number) {
+ if (this.rowOffsets) {
+ return this.getRowCellHeight({ id: String(rowIndex) } as Node);
+ }
+
+ return this.getDefaultCellHeight();
+ }
+
+ /**
+ * 开启换行后, 需要自适应调整高度, 明细表通过 rowCell.heightByField 调整, 同时还有一个 rowOffsets 控制行高, 所以要提前设置好, 保证渲染正确.
+ */
+ private presetRowCellHeightIfNeeded(rowIndex: number) {
+ const { style } = this.spreadsheet.options;
+ const colLeafNodes = this.getColLeafNodes();
+
+ // 不超过一行或者用户已经配置过当前行高则无需预设
+ if (isEmpty(colLeafNodes) || style?.dataCell?.maxLines! <= 1) {
+ return;
+ }
+
+ // 当前行高取整行 dataCell 高度最大的值
+ const maxDataCellHeight = max(
+ colLeafNodes.map((colNode) => {
+ const viewMeta = this.getCellMeta(rowIndex, colNode.colIndex);
+
+ return this.getDataCellAdaptiveHeight(viewMeta!);
+ }),
+ );
+
+ // getCellHeightByRowIndex 会优先读取 heightByField, 保持逻辑统一
+ this.spreadsheet.setOptions({
+ style: {
+ rowCell: {
+ heightByField: {
+ [rowIndex]: maxDataCellHeight || this.getDefaultCellHeight(),
+ },
+ },
+ },
+ });
}
protected initRowOffsets() {
- const heightByField =
- this.spreadsheet.options.style?.rowCell?.heightByField;
+ const { style } = this.spreadsheet.options;
+ const heightByField = style?.rowCell?.heightByField;
- if (keys(heightByField!).length) {
+ if (keys(heightByField!).length || style?.dataCell?.maxLines! > 1) {
const data = this.spreadsheet.dataSet.getDisplayDataSet();
this.rowOffsets = [0];
let lastOffset = 0;
data.forEach((_, rowIndex) => {
+ this.presetRowCellHeightIfNeeded(rowIndex);
const currentHeight = this.getCellHeightByRowIndex(rowIndex);
const currentOffset = lastOffset + currentHeight;
@@ -148,10 +208,6 @@ export class TableFacet extends FrozenFacet {
);
};
- get dataCellTheme() {
- return this.spreadsheet.theme.dataCell?.cell;
- }
-
public destroy(): void {
super.destroy();
this.spreadsheet.off(S2Event.RANGE_SORT, this.onSortHandler);
@@ -197,9 +253,9 @@ export class TableFacet extends FrozenFacet {
};
}
- public getCellMeta = (rowIndex = 0, colIndex = 0) => {
+ public getCellMeta(rowIndex = 0, colIndex = 0) {
const { options, dataSet } = this.spreadsheet;
- const { colLeafNodes } = this.getLayoutResult();
+ const colLeafNodes = this.getColLeafNodes();
const colNode = colLeafNodes[colIndex];
if (!colNode) {
@@ -256,7 +312,7 @@ export class TableFacet extends FrozenFacet {
};
return options.layoutCellMeta?.(cellMeta) ?? cellMeta;
- };
+ }
private getAdaptiveColWidth(colLeafNodes: Node[]) {
const { dataCell } = this.spreadsheet.options.style!;
diff --git a/packages/s2-react/src/components/export/strategy-copy.ts b/packages/s2-react/src/components/export/strategy-copy.ts
index 7a2ebf1bbe..ebce919494 100644
--- a/packages/s2-react/src/components/export/strategy-copy.ts
+++ b/packages/s2-react/src/components/export/strategy-copy.ts
@@ -105,12 +105,13 @@ class StrategyCopyData extends PivotDataCellCopy {
};
protected getDataMatrixByHeaderNode = () => {
- const { getCellMeta } = this.spreadsheet?.facet;
-
return map(this.leafRowNodes, (rowNode) => {
// 获取每行的数据,如果无法获取到数据则使用 placeholder 填充
const rowVal = this.leafColNodes.map((colNode) => {
- const viewMeta = getCellMeta(rowNode.rowIndex, colNode.colIndex)!;
+ const viewMeta = this.spreadsheet.facet.getCellMeta?.(
+ rowNode.rowIndex,
+ colNode.colIndex,
+ )!;
const placeholder = this.getPlaceholder(viewMeta!, colNode);
return this.processValueInRow(viewMeta, placeholder);
diff --git a/s2-site/docs/common/style.zh.md b/s2-site/docs/common/style.zh.md
index b0a95f5dc7..ba94665406 100644
--- a/s2-site/docs/common/style.zh.md
+++ b/s2-site/docs/common/style.zh.md
@@ -70,10 +70,10 @@ order: 3
### CellTextWordWrapStyle
-功能描述:单元格换行配置
+功能描述:单元格换行配置。[查看示例](/examples/layout/multi-line-text#pivot)
| 参数 | 说明 | 类型 | 默认值 | 必选 |
| ------- | ------------ | ------ | ------ | ---- |
-| wordWrap | 文本是否自动换行 (数值单元格不建议换行)。[了解更多](https://g.antv.antgroup.com/api/basic/text#wordwrap) | `boolean` | `true` | |
-| maxLines | 最大行数,文本超出后将被截断 (数值单元格不建议换行),需要配合 `wordWrap` 和 `textOverflow` 一起使用。[了解更多](https://g.antv.antgroup.com/api/basic/text#maxlines) | `number` | `1` | |
+| wordWrap | 文本是否自动换行(数值单元格不建议换行)。[了解更多](https://g.antv.antgroup.com/api/basic/text#wordwrap) | `boolean` | `true` | |
+| maxLines | 最大行数,文本超出后将被截断(数值单元格不建议换行),需要配合 `wordWrap` 和 `textOverflow` 一起使用。[了解更多](https://g.antv.antgroup.com/api/basic/text#maxlines) | `number` | `1` | |
| textOverflow | 自定义隐藏的文本溢出内容,例如直接裁剪、追加省略号或一个自定义字符串,需要配合 `wordWrap` 和 `maxLines` 一起使用。[了解更多](https://g.antv.antgroup.com/api/basic/text#textoverflow) | `string` | `ellipsis` | |
diff --git a/s2-site/docs/manual/advanced/custom/cell-size.zh.md b/s2-site/docs/manual/advanced/custom/cell-size.zh.md
index 0f63af745e..80ca94b389 100644
--- a/s2-site/docs/manual/advanced/custom/cell-size.zh.md
+++ b/s2-site/docs/manual/advanced/custom/cell-size.zh.md
@@ -101,14 +101,22 @@ const s2Options = {
-```ts
+```ts | pure
+import { EXTRA_FIELD } from '@antv/s2'
+
const s2Options = {
style: {
rowCell: {
widthByField: {
- city: 100
+ // 调整维度
+ city: 100,
+ // 调整具体单元格
+ 'root[&]浙江省[&]杭州市': 60,
+ // 数值挂行头时对应的 [数值] 虚拟字段
+ [EXTRA_FIELD]: 20,
},
heightByField: {
+ type: 10,
'root[&]浙江省[&]杭州市': 60,
'root[&]浙江省[&]宁波市': 100,
},
@@ -117,11 +125,11 @@ const s2Options = {
}
```
-
+
:::info{title="提示"}
-明细表有一点特殊,由于只有列头,如果想给**特定行**设置不同的高度,则可以根据行序号调整 (从 `0` 开始)
+明细表有一点特殊,由于只有列头,如果想给**特定行**设置不同的高度,则可以根据**行序号**调整 (从 `0` 开始)
:::
@@ -204,8 +212,8 @@ const s2Options = {
如果想给特定某一列设置不同的宽高,可以通过 `colCell` 的 `widthByField` 和 `heightByField` 预设宽高来实现,支持两种类型的配置:
-- **fieldId** (例:`root[&]家具[&]沙发[&]number`): 行列交叉后每一个列头节点对应的唯一 ID, 适用于宽高精确到具体的单元格 [(如何获取 ID)](/docs/manual/advanced/get-cell-data#%E8%8E%B7%E5%8F%96%E6%8C%87%E5%AE%9A%E5%8C%BA%E5%9F%9F%E5%8D%95%E5%85%83%E6%A0%BC)
-- **field** (例:`city`): 对应 `s2DataConfig.fields.columns` 中配置的 `field`, 适用于精确到某一类维值的单元格
+- **fieldId** (例:`root[&]家具[&]沙发[&]number`): 行列交叉后每一个列头节点对应的唯一 ID, 适用于宽高精确到具体的单元格 [(如何获取 ID)](/docs/manual/advanced/get-cell-data#%E8%8E%B7%E5%8F%96%E6%8C%87%E5%AE%9A%E5%8C%BA%E5%9F%9F%E5%8D%95%E5%85%83%E6%A0%BC)
+- **field** (例:`city`): 对应 `s2DataConfig.fields.columns` 中配置的 `field`, 适用于精确到某一类维值的单元格
:::
@@ -216,12 +224,17 @@ const s2Options = {
style: {
colCell: {
widthByField: {
- // 默认 [数值挂列头], EXTRA_FIELD 为内部虚拟数值列
+ // 默认 [数值挂列头], EXTRA_FIELD 为内部虚拟数值列,对应 [数值] 单元格
[EXTRA_FIELD]: 60,
+ city: 20,
'root[&]家具[&]沙发[&]number': 120,
},
heightByField: {
[EXTRA_FIELD]: 80,
+ // 调整维度
+ city: 20,
+ // 调整具体单元格
+ 'root[&]家具[&]沙发[&]number': 120,
},
},
},
@@ -232,19 +245,69 @@ const s2Options = {
## 隐藏列头
-还可以将高度设置为 `0`, 从而实现**隐藏列头**的效果,[查看示例](/examples/layout/custom#hide-columns)
+还可以将高度设置为 `0`, 从而实现**隐藏列头**的效果。
+
+### 透视表
+
+配置 `colCell.height` 改变单元格高度从而隐藏全部列头。所需隐藏部分列头请查看 [交互-隐藏列头-透视表](/manual/advanced/interaction/hide-columns#2-%E9%80%8F%E8%A7%86%E8%A1%A8) 相关文档。
```ts
const s2Options = {
style: {
colCell: {
+ height: 0
+ },
+ },
+}
+```
+
+
+
+也支持通过 `heightByField` 隐藏部分列维度,将高度设置为 `0`, 列头对应的单元格和**所对应的角头**都不会渲染。
+
+```ts
+import { EXTRA_FIELD } from '@antv/s2'
+
+const s2Options = {
+ style: {
+ colCell: {
+ // 隐藏全部列头
height: 0,
+ heightByField: {
+ // 隐藏部分维度 (类别/子类别)
+ // type: 0,
+ // sub_type: 0,
+ // EXTRA_FIELD 对应 [数量] 这一虚拟维度列
+ [EXTRA_FIELD]: 30,
+ },
},
},
}
```
-
+
+
+[查看示例](/examples/layout/custom/#hide-pivot-columns)
+
+### 明细表
+
+配置 `colCell.height` 改变单元格高度从而隐藏全部列头。所需隐藏部分列头请查看 [交互-隐藏列头-明细表](/manual/advanced/interaction/hide-columns#1-%E6%98%8E%E7%BB%86%E8%A1%A8) 相关文档。
+
+
+
+[查看示例](/examples/layout/custom#hide-table-columns)
+
+### 分割线
+
+默认列头有一条分割线,隐藏列头如果不需要的话,可以将分割线的透明度设置为 `0`.
+
+```ts
+s2.setTheme({
+ splitLine: {
+ horizontalBorderColorOpacity: 0,
+ },
+})
+```
## API 文档
diff --git a/s2-site/docs/manual/basic/multi-line-text.zh.md b/s2-site/docs/manual/basic/multi-line-text.zh.md
index 87e38b290b..3fb4ce49f8 100644
--- a/s2-site/docs/manual/basic/multi-line-text.zh.md
+++ b/s2-site/docs/manual/basic/multi-line-text.zh.md
@@ -5,36 +5,36 @@ tag: New
---
:::warning{title="注意"}
-请确保已经阅读了 [基础教程](/manual/basic/base-concept) 和 [主题配置](/manual/basic/theme) 等章节。
+请确保已经阅读了 [基础教程](/manual/basic/base-concept) 和 [主题配置](/manual/basic/theme) 等章节,并对 [AntV/G](https://g.antv.antgroup.com/) 渲染引擎有所了解。
:::
在基于 `DOM` 的 表格中,我们可以写一些简单的 [CSS 属性](https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow), 就可以实现文本的`自动换行`, `溢出隐藏`等特性,因为浏览器已经帮我们计算好了,而在 `Canvas` 中,`文本是否溢出`, `文字换行坐标计算`, `多行文本高度自适应` 等特性都需要自行实现。
得益于 `AntV/G` 5.0 渲染引擎的升级,`S2 2.0` 现在只需要简单的配置即可支持多行文本的渲染,支持自动换行。
-
+
## 使用
-S2 内部适配了 `AntV/G 5.0` 的 [多行布局能力](https://g.antv.antgroup.com/api/basic/text#%E5%A4%9A%E8%A1%8C%E5%B8%83%E5%B1%80), 支持如下配置:
+S2 内部适配了 `AntV/G 5.0` 的 [多行布局能力](https://g.antv.antgroup.com/api/basic/text#%E5%A4%9A%E8%A1%8C%E5%B8%83%E5%B1%80), 可以根据文本高度自适应单元格高度,并支持如下配置:
:::info{title="提示"}
具体参数请跳转 `AntV/G` [官网查看](https://g.antv.antgroup.com/api/basic/text#%E5%A4%9A%E8%A1%8C%E5%B8%83%E5%B1%80).
-- `maxLines`: 最大行数,文本超出后将被截断。
-- `wordWrap`: 是否开启自动折行,默认值为 false.
+- `maxLines`: 最大行数,一个具体的整数,文本超出后将被截断 (默认值为 `1`)。
+- `wordWrap`: 是否开启自动折行,(默认值为 `false`).
- `textOverflow`:
- - 'clip' 直接截断文本
- - 'ellipsis' 使用 ... 表示被截断的文本
- - 自定义字符串,使用它表示被截断的文本
+ - 'clip': 直接截断文本。
+ - 'ellipsis': 使用 ... 表示被截断的文本。
+ - 自定义字符串,使用它表示被截断的文本。
:::
在 S2 中,通过 [Style](/api/general/s2-options#style) 即可实现渲染多行文本,当文本自动换行后,如果小于单元格高度,则会自动调整。
:::warning{title="注意"}
-数值单元格 (dataCell) 不建议换行,容易产生歧义。
+数据单元格 (dataCell) 如果展示的是 `数字` 则不建议换行,容易产生歧义。
:::
```ts
@@ -54,7 +54,7 @@ const s2Options = {
cornerCell: cellTextWordWrapStyle,
rowCell: cellTextWordWrapStyle,
// 数值不建议换行,容易产生歧义
- // dataCell: cellTheme,
+ dataCell: cellTextWordWrapStyle,
},
};
@@ -62,7 +62,17 @@ const s2Options = {
## 效果
-
+### 透视表
+
+
+
+[查看示例](/examples/layout/multi-line-text/#pivot)
+
+### 明细表
+
+
+
+[查看示例](/examples/layout/multi-line-text/#table)
## 获取单元格文本状态
diff --git a/s2-site/examples/layout/custom/demo/custom-pivot-size.ts b/s2-site/examples/layout/custom/demo/custom-pivot-size.ts
index f358497965..e21503fd76 100644
--- a/s2-site/examples/layout/custom/demo/custom-pivot-size.ts
+++ b/s2-site/examples/layout/custom/demo/custom-pivot-size.ts
@@ -22,6 +22,9 @@ fetch(
// width: (rowNode) => 100,
// height: (rowNode) => 100,
heightByField: {
+ // 特定维度 (如: 城市)
+ city: 50,
+ // 特定维值
'root[&]浙江省[&]杭州市': 30,
'root[&]浙江省[&]宁波市': 100,
},
@@ -32,9 +35,12 @@ fetch(
widthByField: {
// 默认 [数值挂列头], EXTRA_FIELD 为内部虚拟数值列
[EXTRA_FIELD]: 60,
+ // 特定维值
'root[&]家具[&]沙发[&]number': 120,
},
heightByField: {
+ // 特定维度 (如: 类别)
+ type: 50,
[EXTRA_FIELD]: 80,
},
},
diff --git a/s2-site/examples/layout/custom/demo/custom-table-size.ts b/s2-site/examples/layout/custom/demo/custom-table-size.ts
index 4414267c0e..639253babd 100644
--- a/s2-site/examples/layout/custom/demo/custom-table-size.ts
+++ b/s2-site/examples/layout/custom/demo/custom-table-size.ts
@@ -45,8 +45,14 @@ fetch('https://render.alipay.com/p/yuyan/180020010001215413/s2/basic.json')
},
colCell: {
height: 50,
+ widthByField: {
+ // 特定维度 (如: 城市)
+ city: 100,
+ // 特定维值 (明细表场景下等同于配置特定维度)
+ 'root[&]province': 80,
+ },
},
- // 明细表每一行根据行序号单独设置
+ // 明细表每一行根据行序号单独设置 (从 0 开始)
rowCell: {
heightByField: {
'0': 40,
diff --git a/s2-site/examples/layout/custom/demo/custom-tree-row-width.ts b/s2-site/examples/layout/custom/demo/custom-tree-row-width.ts
index 9fb18b368e..c960320f9d 100644
--- a/s2-site/examples/layout/custom/demo/custom-tree-row-width.ts
+++ b/s2-site/examples/layout/custom/demo/custom-tree-row-width.ts
@@ -15,10 +15,11 @@ fetch(
frozen: {
// 默认冻结行头, 行头和数值区域都会展示滚动条
// rowHeader: false,
- // 冻结行头时, 行头宽度占表格的 1/2, 支持动态调整 (0 - 1)
- // rowHeader: 0.2,
+ // 冻结行头时, 默认行头宽度占表格的 1/2, 支持动态调整 (0 - 1)
+ rowHeader: 0.5,
},
style: {
+ // 和平铺模式配置一致
rowCell: {
width: 200,
},
diff --git a/s2-site/examples/layout/custom/demo/hide-pivot-columns.ts b/s2-site/examples/layout/custom/demo/hide-pivot-columns.ts
new file mode 100644
index 0000000000..f3170149b9
--- /dev/null
+++ b/s2-site/examples/layout/custom/demo/hide-pivot-columns.ts
@@ -0,0 +1,39 @@
+import { PivotSheet, S2Options, EXTRA_FIELD } from '@antv/s2';
+
+fetch(
+ 'https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json',
+)
+ .then((res) => res.json())
+ .then(async (dataCfg) => {
+ const container = document.getElementById('container');
+
+ const s2Options: S2Options = {
+ width: 600,
+ height: 480,
+ hierarchyType: 'grid',
+ style: {
+ colCell: {
+ // 隐藏全部列头
+ height: 0,
+ heightByField: {
+ // 隐藏部分维度 (类别/子类别)
+ // type: 0,
+ // sub_type: 0,
+ // EXTRA_FIELD 对应 [数量] 这一虚拟维度列
+ [EXTRA_FIELD]: 30,
+ },
+ },
+ },
+ };
+
+ const s2 = new PivotSheet(container, dataCfg, s2Options);
+
+ // 默认列头有一条分割线, 如果不需要的话将分割线的透明度设置为 0
+ s2.setTheme({
+ splitLine: {
+ horizontalBorderColorOpacity: 0.2,
+ },
+ });
+
+ await s2.render();
+ });
diff --git a/s2-site/examples/layout/custom/demo/hide-columns.ts b/s2-site/examples/layout/custom/demo/hide-table-columns.ts
similarity index 96%
rename from s2-site/examples/layout/custom/demo/hide-columns.ts
rename to s2-site/examples/layout/custom/demo/hide-table-columns.ts
index 8602b699e7..cfba10a252 100644
--- a/s2-site/examples/layout/custom/demo/hide-columns.ts
+++ b/s2-site/examples/layout/custom/demo/hide-table-columns.ts
@@ -48,7 +48,7 @@ fetch('https://render.alipay.com/p/yuyan/180020010001215413/s2/basic.json')
// 默认列头有一条分割线, 如果不需要的话将分割线的透明度设置为 0
s2.setTheme({
splitLine: {
- horizontalBorderColorOpacity: 0,
+ horizontalBorderColorOpacity: 0.2,
},
});
diff --git a/s2-site/examples/layout/custom/demo/meta.json b/s2-site/examples/layout/custom/demo/meta.json
index 9b843cb333..78d5977e06 100644
--- a/s2-site/examples/layout/custom/demo/meta.json
+++ b/s2-site/examples/layout/custom/demo/meta.json
@@ -10,7 +10,8 @@
"zh": "自定义透视表行列宽高",
"en": "Custom PivotSheet Size"
},
- "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/%24sNoM1o7b/8a35f685-f989-4125-aada-046f90b93969.png"
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/%24sNoM1o7b/8a35f685-f989-4125-aada-046f90b93969.png",
+ "new": true
},
{
"filename": "custom-table-size.ts",
@@ -18,7 +19,8 @@
"zh": "自定义明细表行列宽高",
"en": "Custom TableSheet Height"
},
- "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/oIjIixviI/ccba0c66-c8ba-4285-b0ec-fc776d0a4cdf.png"
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/oIjIixviI/ccba0c66-c8ba-4285-b0ec-fc776d0a4cdf.png",
+ "new": true
},
{
"filename": "custom-row-col-cell-width.ts",
@@ -26,7 +28,8 @@
"zh": "自定义行列单元格宽度",
"en": "Custom Row/Column Cell Height"
},
- "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/gzR%26xlnjG/7b23ff29-0789-4420-ad23-e1df96e4489d.png"
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/gzR%26xlnjG/7b23ff29-0789-4420-ad23-e1df96e4489d.png",
+ "new": true
},
{
"filename": "custom-tree-row-width.ts",
@@ -47,12 +50,22 @@
"new": true
},
{
- "filename": "hide-columns.ts",
+ "filename": "hide-table-columns.ts",
+ "title": {
+ "zh": "隐藏明细表列头",
+ "en": "Hide Table Columns"
+ },
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/7uLsxYg0N/b85dc985-6a07-40fd-a73e-4f0f17e63b72.png",
+ "new": true
+ },
+ {
+ "filename": "hide-pivot-columns.ts",
"title": {
- "zh": "隐藏列头",
- "en": "Hide Columns"
+ "zh": "隐藏透视表列头",
+ "en": "Hide Pivot Table Columns"
},
- "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/7uLsxYg0N/b85dc985-6a07-40fd-a73e-4f0f17e63b72.png"
+ "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1obvQq2BkOEAAAAAAAAAAAAADmJ7AQ/original",
+ "new": true
},
{
"filename": "hide-value.ts",
@@ -69,15 +82,6 @@
"en": "Only Show Row Header"
},
"screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*pezZTI9lp50AAAAAAAAAAAAADmJ7AQ/original"
- },
- {
- "filename": "multi-line-text.ts",
- "title": {
- "zh": "多行文本 / 文本自动换行",
- "en": "Multi Line Text"
- },
- "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*uMV6QYL-TcwAAAAAAAAAAAAADmJ7AQ/original",
- "new": true
}
]
}
diff --git a/s2-site/examples/layout/multi-line-text/API.en.md b/s2-site/examples/layout/multi-line-text/API.en.md
new file mode 100644
index 0000000000..21789df9ab
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/API.en.md
@@ -0,0 +1,8 @@
+---
+title: API
+order: 0
+---
+
+# Style
+
+
diff --git a/s2-site/examples/layout/multi-line-text/API.zh.md b/s2-site/examples/layout/multi-line-text/API.zh.md
new file mode 100644
index 0000000000..5fa11d70ce
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/API.zh.md
@@ -0,0 +1,8 @@
+---
+title: API
+order: 0
+---
+
+# Style
+
+
diff --git a/s2-site/examples/layout/multi-line-text/demo/meta.json b/s2-site/examples/layout/multi-line-text/demo/meta.json
new file mode 100644
index 0000000000..7b994ad951
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/demo/meta.json
@@ -0,0 +1,26 @@
+{
+ "title": {
+ "zh": "透视表",
+ "en": "Pivot"
+ },
+ "demos": [
+ {
+ "filename": "pivot.ts",
+ "title": {
+ "zh": "透视表 - 文本自动换行",
+ "en": "Multi Line Text"
+ },
+ "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*uMV6QYL-TcwAAAAAAAAAAAAADmJ7AQ/original",
+ "new": true
+ },
+ {
+ "filename": "table.ts",
+ "title": {
+ "zh": "明细表 - 文本自动换行",
+ "en": "Multi Line Text"
+ },
+ "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*psedTKQWiWUAAAAAAAAAAAAADmJ7AQ/original",
+ "new": true
+ }
+ ]
+}
diff --git a/s2-site/examples/layout/custom/demo/multi-line-text.ts b/s2-site/examples/layout/multi-line-text/demo/pivot.ts
similarity index 96%
rename from s2-site/examples/layout/custom/demo/multi-line-text.ts
rename to s2-site/examples/layout/multi-line-text/demo/pivot.ts
index ea91c58921..979b972c97 100644
--- a/s2-site/examples/layout/custom/demo/multi-line-text.ts
+++ b/s2-site/examples/layout/multi-line-text/demo/pivot.ts
@@ -69,7 +69,7 @@ fetch('https://assets.antv.antgroup.com/s2/basic.json')
tooltip: {
enable: true,
content: (cell) => {
- const text = cell.getOriginalText();
+ const text = cell?.getOriginalText();
const span = document.createElement('span');
span.innerHTML = text;
@@ -99,7 +99,7 @@ fetch('https://assets.antv.antgroup.com/s2/basic.json')
height: 50,
},
// 数值不建议换行, 容易产生歧义
- // dataCell: cellTheme,
+ // dataCell: cellTextWordWrapStyle,
},
};
diff --git a/s2-site/examples/layout/multi-line-text/demo/table.ts b/s2-site/examples/layout/multi-line-text/demo/table.ts
new file mode 100644
index 0000000000..696b4b1d67
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/demo/table.ts
@@ -0,0 +1,101 @@
+import {
+ CellTextWordWrapStyle,
+ S2DataConfig,
+ S2Options,
+ TableSheet,
+} from '@antv/s2';
+import '@antv/s2/dist/style.min.css';
+
+fetch('https://assets.antv.antgroup.com/s2/basic.json')
+ .then((res) => res.json())
+ .then(async (data) => {
+ const container = document.getElementById('container');
+ const s2DataConfig: S2DataConfig = {
+ fields: {
+ columns: ['province', 'city', 'type', 'price', 'cost'],
+ },
+ meta: [
+ {
+ field: 'province',
+ name: '省份省份省份省份省份省份省份省份省份',
+ },
+ {
+ field: 'city',
+ name: '城市城市城市城市城市城市城市',
+ },
+ {
+ field: 'type',
+ name: '商品类别商品类别商品类别商品类别商品类别商品类别',
+ },
+ {
+ field: 'price',
+ name: '价格价格价格价格价格价格',
+ },
+ {
+ field: 'cost',
+ name: '成本成本成本成本成本成本成本',
+ },
+ ],
+ data: [
+ {
+ province: '浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江浙江',
+ city: '杭州杭州杭州杭州杭州杭州',
+ type: '纸张纸张纸张纸张纸张',
+ price: '2',
+ cost: '20',
+ },
+ ...data,
+ ],
+ };
+
+ const cellTextWordWrapStyle: CellTextWordWrapStyle = {
+ // 最大行数,文本超出后将被截断
+ maxLines: 3,
+ // 文本是否换行
+ wordWrap: true,
+ // 可选项见:https://g.antv.antgroup.com/api/basic/text#textoverflow
+ textOverflow: 'ellipsis',
+ };
+
+ const s2Options: S2Options = {
+ width: 600,
+ height: 480,
+ seriesNumber: {
+ enable: true,
+ text: '序号序号序号序号序号序号',
+ },
+ tooltip: {
+ enable: true,
+ content: (cell) => {
+ const text = cell?.getOriginalText();
+ const span = document.createElement('span');
+
+ span.innerHTML = text;
+
+ return span;
+ },
+ },
+ // 如果有省略号, 复制到的是完整文本
+ interaction: {
+ copy: {
+ enable: true,
+ withFormat: true,
+ withHeader: true,
+ },
+ brushSelection: {
+ dataCell: true,
+ rowCell: true,
+ colCell: true,
+ },
+ },
+ style: {
+ colCell: cellTextWordWrapStyle,
+ // 如果是数值不建议换行, 容易产生歧义
+ dataCell: cellTextWordWrapStyle,
+ },
+ };
+
+ const s2 = new TableSheet(container, s2DataConfig, s2Options);
+
+ await s2.render();
+ });
diff --git a/s2-site/examples/layout/multi-line-text/index.en.md b/s2-site/examples/layout/multi-line-text/index.en.md
new file mode 100644
index 0000000000..c9395bb98b
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/index.en.md
@@ -0,0 +1,4 @@
+---
+title: Multi Line Text
+order: 5
+---
diff --git a/s2-site/examples/layout/multi-line-text/index.zh.md b/s2-site/examples/layout/multi-line-text/index.zh.md
new file mode 100644
index 0000000000..2cd553e4fc
--- /dev/null
+++ b/s2-site/examples/layout/multi-line-text/index.zh.md
@@ -0,0 +1,4 @@
+---
+title: 多行文本
+order: 5
+---