@leankylin-sheet/core 2.0.2 → 2.0.3
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.
- package/dist/index.esm.js +15 -7
- package/dist/index.js +15 -7
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -42903,14 +42903,14 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
42903
42903
|
var _measureText3 = getMeasureText(str, renderCtx, sheetCtx);
|
|
42904
42904
|
var _textWidth = _measureText3.width;
|
|
42905
42905
|
var _textHeight2 = _measureText3.actualBoundingBoxAscent + _measureText3.actualBoundingBoxDescent;
|
|
42906
|
-
var
|
|
42906
|
+
var _width2 = _textWidth * Math.cos(rt * Math.PI / 180) + _textHeight2 * Math.sin(rt * Math.PI / 180);
|
|
42907
42907
|
var _height = _textWidth * Math.sin(rt * Math.PI / 180) + _textHeight2 * Math.cos(rt * Math.PI / 180);
|
|
42908
42908
|
var _lastWord = str.substr(str.length - 1, 1);
|
|
42909
42909
|
if (_lastWord === " " || checkWordByteLength(_lastWord) === 2) {
|
|
42910
42910
|
spaceOrTwoByte = {
|
|
42911
42911
|
index: _i5,
|
|
42912
42912
|
str: str,
|
|
42913
|
-
width:
|
|
42913
|
+
width: _width2,
|
|
42914
42914
|
height: _height,
|
|
42915
42915
|
asc: _measureText3.actualBoundingBoxAscent,
|
|
42916
42916
|
desc: _measureText3.actualBoundingBoxDescent
|
|
@@ -42975,7 +42975,7 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
42975
42975
|
_i5 += 1;
|
|
42976
42976
|
}
|
|
42977
42977
|
} else {
|
|
42978
|
-
if (
|
|
42978
|
+
if (_width2 + space_width > cellWidth && !_.isNil(text_all_split[splitIndex])) {
|
|
42979
42979
|
if (!_.isNil(spaceOrTwoByte) && spaceOrTwoByte.index < _i5) {
|
|
42980
42980
|
anchor = spaceOrTwoByte.index;
|
|
42981
42981
|
_i5 = spaceOrTwoByte.index + 1;
|
|
@@ -43320,13 +43320,21 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
43320
43320
|
if (isMode === "onlyWidth") {
|
|
43321
43321
|
return textContent;
|
|
43322
43322
|
}
|
|
43323
|
-
var
|
|
43323
|
+
var _width3 = textWidthAll;
|
|
43324
43324
|
var _height2 = textHeightAll;
|
|
43325
43325
|
var _left3 = space_width + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43326
43326
|
if (horizonAlign === "0") {
|
|
43327
|
-
|
|
43327
|
+
var _cell$mc, _cell$mc2;
|
|
43328
|
+
var mcCIndex = cell === null || cell === void 0 ? void 0 : (_cell$mc = cell.mc) === null || _cell$mc === void 0 ? void 0 : _cell$mc.c;
|
|
43329
|
+
var mcCs = cell === null || cell === void 0 ? void 0 : (_cell$mc2 = cell.mc) === null || _cell$mc2 === void 0 ? void 0 : _cell$mc2.cs;
|
|
43330
|
+
var startMc = mcCIndex - 1;
|
|
43331
|
+
var endMc = mcCIndex + mcCs - 1;
|
|
43332
|
+
var startX = sheetCtx.visibledatacolumn[startMc] || 0;
|
|
43333
|
+
var endX = sheetCtx.visibledatacolumn[endMc] || 0;
|
|
43334
|
+
var _width = mcCIndex ? endX - startX : cellWidth;
|
|
43335
|
+
_left3 = _width / 2 - _width3 / 2 + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43328
43336
|
} else if (horizonAlign === "2") {
|
|
43329
|
-
_left3 = cellWidth - space_width -
|
|
43337
|
+
_left3 = cellWidth - space_width - _width3 + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43330
43338
|
}
|
|
43331
43339
|
var _top3 = cellHeight - space_height - _height2 + _measureText4.actualBoundingBoxAscent * Math.cos(_rtPI) + _textWidth2 * Math.sin(_rtPI) * isRotateUp;
|
|
43332
43340
|
if (verticalAlign === "0") {
|
|
@@ -43338,7 +43346,7 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
43338
43346
|
var _wordGroup2 = {
|
|
43339
43347
|
content: value,
|
|
43340
43348
|
style: fontset,
|
|
43341
|
-
width:
|
|
43349
|
+
width: _width3,
|
|
43342
43350
|
height: _height2,
|
|
43343
43351
|
left: _left3,
|
|
43344
43352
|
top: _top3
|
package/dist/index.js
CHANGED
|
@@ -42913,14 +42913,14 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
42913
42913
|
var _measureText3 = getMeasureText(str, renderCtx, sheetCtx);
|
|
42914
42914
|
var _textWidth = _measureText3.width;
|
|
42915
42915
|
var _textHeight2 = _measureText3.actualBoundingBoxAscent + _measureText3.actualBoundingBoxDescent;
|
|
42916
|
-
var
|
|
42916
|
+
var _width2 = _textWidth * Math.cos(rt * Math.PI / 180) + _textHeight2 * Math.sin(rt * Math.PI / 180);
|
|
42917
42917
|
var _height = _textWidth * Math.sin(rt * Math.PI / 180) + _textHeight2 * Math.cos(rt * Math.PI / 180);
|
|
42918
42918
|
var _lastWord = str.substr(str.length - 1, 1);
|
|
42919
42919
|
if (_lastWord === " " || checkWordByteLength(_lastWord) === 2) {
|
|
42920
42920
|
spaceOrTwoByte = {
|
|
42921
42921
|
index: _i5,
|
|
42922
42922
|
str: str,
|
|
42923
|
-
width:
|
|
42923
|
+
width: _width2,
|
|
42924
42924
|
height: _height,
|
|
42925
42925
|
asc: _measureText3.actualBoundingBoxAscent,
|
|
42926
42926
|
desc: _measureText3.actualBoundingBoxDescent
|
|
@@ -42985,7 +42985,7 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
42985
42985
|
_i5 += 1;
|
|
42986
42986
|
}
|
|
42987
42987
|
} else {
|
|
42988
|
-
if (
|
|
42988
|
+
if (_width2 + space_width > cellWidth && !___default['default'].isNil(text_all_split[splitIndex])) {
|
|
42989
42989
|
if (!___default['default'].isNil(spaceOrTwoByte) && spaceOrTwoByte.index < _i5) {
|
|
42990
42990
|
anchor = spaceOrTwoByte.index;
|
|
42991
42991
|
_i5 = spaceOrTwoByte.index + 1;
|
|
@@ -43330,13 +43330,21 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
43330
43330
|
if (isMode === "onlyWidth") {
|
|
43331
43331
|
return textContent;
|
|
43332
43332
|
}
|
|
43333
|
-
var
|
|
43333
|
+
var _width3 = textWidthAll;
|
|
43334
43334
|
var _height2 = textHeightAll;
|
|
43335
43335
|
var _left3 = space_width + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43336
43336
|
if (horizonAlign === "0") {
|
|
43337
|
-
|
|
43337
|
+
var _cell$mc, _cell$mc2;
|
|
43338
|
+
var mcCIndex = cell === null || cell === void 0 ? void 0 : (_cell$mc = cell.mc) === null || _cell$mc === void 0 ? void 0 : _cell$mc.c;
|
|
43339
|
+
var mcCs = cell === null || cell === void 0 ? void 0 : (_cell$mc2 = cell.mc) === null || _cell$mc2 === void 0 ? void 0 : _cell$mc2.cs;
|
|
43340
|
+
var startMc = mcCIndex - 1;
|
|
43341
|
+
var endMc = mcCIndex + mcCs - 1;
|
|
43342
|
+
var startX = sheetCtx.visibledatacolumn[startMc] || 0;
|
|
43343
|
+
var endX = sheetCtx.visibledatacolumn[endMc] || 0;
|
|
43344
|
+
var _width = mcCIndex ? endX - startX : cellWidth;
|
|
43345
|
+
_left3 = _width / 2 - _width3 / 2 + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43338
43346
|
} else if (horizonAlign === "2") {
|
|
43339
|
-
_left3 = cellWidth - space_width -
|
|
43347
|
+
_left3 = cellWidth - space_width - _width3 + _textHeight3 * Math.sin(_rtPI) * isRotateUp;
|
|
43340
43348
|
}
|
|
43341
43349
|
var _top3 = cellHeight - space_height - _height2 + _measureText4.actualBoundingBoxAscent * Math.cos(_rtPI) + _textWidth2 * Math.sin(_rtPI) * isRotateUp;
|
|
43342
43350
|
if (verticalAlign === "0") {
|
|
@@ -43348,7 +43356,7 @@ function getCellTextInfo(cell, renderCtx, sheetCtx, option, ctx) {
|
|
|
43348
43356
|
var _wordGroup2 = {
|
|
43349
43357
|
content: value,
|
|
43350
43358
|
style: fontset,
|
|
43351
|
-
width:
|
|
43359
|
+
width: _width3,
|
|
43352
43360
|
height: _height2,
|
|
43353
43361
|
left: _left3,
|
|
43354
43362
|
top: _top3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": "http://114.55.85.79:19999/leankylin-front/leankylin-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "father-build"
|
|
14
|
+
},
|
|
12
15
|
"dependencies": {
|
|
13
|
-
"@leankylin-sheet/formula-parser": "^2.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "^2.0.3",
|
|
14
17
|
"dayjs": "^1.11.0",
|
|
15
18
|
"immer": "^9.0.12",
|
|
16
19
|
"lodash": "^4.17.21",
|
|
@@ -38,8 +41,5 @@
|
|
|
38
41
|
],
|
|
39
42
|
"publishConfig": {
|
|
40
43
|
"access": "public"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "father-build"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|