office-viewer 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,6 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
9
9
  // 这样才能让不同字体大小的文字垂直对齐
10
10
  ctx.textBaseline = 'alphabetic';
11
11
  var defaultFontHeight = dataProvider.getDefaultFontSize().height;
12
- var latterSpace = defaultFontHeight * 0.1;
13
12
  var textPositions = [];
14
13
  var totalLineHeight = lines.reduce(function (acc, line) {
15
14
  return acc + (line.maxHeight || defaultFontHeight);
@@ -36,8 +35,6 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
36
35
  var totalLineWidth = tokens.reduce(function (acc, token) {
37
36
  return acc + (token.w || 0);
38
37
  }, 0);
39
- // 加上字母间距
40
- totalLineWidth += latterSpace * (tokens.length - 1);
41
38
  if (horizontal === 'center') {
42
39
  currentX = x + (width - totalLineWidth) / 2;
43
40
  }
@@ -67,7 +64,7 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
67
64
  height: fontHeight
68
65
  });
69
66
  // 这里其实不大可能为零
70
- currentX = currentX + (token.w || 0) + latterSpace;
67
+ currentX = currentX + (token.w || 0);
71
68
  }
72
69
  }
73
70
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
@@ -3,4 +3,4 @@
3
3
  */
4
4
  import { CT_SortState } from '../../../../openxml/ExcelTypes';
5
5
  import { RangeRef } from '../../../types/RangeRef';
6
- export declare function getColumnSortOrder(colIndex: number, rangeRef: RangeRef, sortState?: CT_SortState): "desc" | "none" | "asc";
6
+ export declare function getColumnSortOrder(colIndex: number, rangeRef: RangeRef, sortState?: CT_SortState): "none" | "desc" | "asc";
@@ -13,7 +13,6 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
13
13
  // 这样才能让不同字体大小的文字垂直对齐
14
14
  ctx.textBaseline = 'alphabetic';
15
15
  var defaultFontHeight = dataProvider.getDefaultFontSize().height;
16
- var latterSpace = defaultFontHeight * 0.1;
17
16
  var textPositions = [];
18
17
  var totalLineHeight = lines.reduce(function (acc, line) {
19
18
  return acc + (line.maxHeight || defaultFontHeight);
@@ -40,8 +39,6 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
40
39
  var totalLineWidth = tokens.reduce(function (acc, token) {
41
40
  return acc + (token.w || 0);
42
41
  }, 0);
43
- // 加上字母间距
44
- totalLineWidth += latterSpace * (tokens.length - 1);
45
42
  if (horizontal === 'center') {
46
43
  currentX = x + (width - totalLineWidth) / 2;
47
44
  }
@@ -71,7 +68,7 @@ function drawMultiLineText(excelRender, sheet, ctx, dataProvider, fontStyle, lin
71
68
  height: fontHeight
72
69
  });
73
70
  // 这里其实不大可能为零
74
- currentX = currentX + (token.w || 0) + latterSpace;
71
+ currentX = currentX + (token.w || 0);
75
72
  }
76
73
  }
77
74
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-viewer",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "office 文档在线预览",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",