@fileverse-dev/fortune-core 1.3.6-right → 1.3.6-right-1
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/es/canvas.js +6 -6
- package/lib/canvas.js +6 -6
- package/package.json +1 -1
package/es/canvas.js
CHANGED
|
@@ -855,7 +855,7 @@ var Canvas = function () {
|
|
|
855
855
|
}, renderCtx);
|
|
856
856
|
};
|
|
857
857
|
Canvas.prototype.cellRender = function (r, c, startY, startX, endY, endX, value, renderCtx, afCompute, cfCompute, offsetLeft, offsetTop, dynamicArrayCompute, cellOverflowMap, colStart, colEnd, scrollHeight, scrollWidth, bodrder05, isMerge) {
|
|
858
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
858
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
859
859
|
if (isMerge === void 0) {
|
|
860
860
|
isMerge = false;
|
|
861
861
|
}
|
|
@@ -945,7 +945,7 @@ var Canvas = function () {
|
|
|
945
945
|
renderCtx.fill();
|
|
946
946
|
}
|
|
947
947
|
var text = optionValue_1[i];
|
|
948
|
-
var fontSize = (cell === null || cell === void 0 ? void 0 : cell.fs) * this_1.sheetCtx.zoomRatio;
|
|
948
|
+
var fontSize = ((_f = cell === null || cell === void 0 ? void 0 : cell.fs) !== null && _f !== void 0 ? _f : 13) * this_1.sheetCtx.zoomRatio;
|
|
949
949
|
renderCtx.font = "".concat(fontSize, "px sans-serif");
|
|
950
950
|
renderCtx.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
951
951
|
renderCtx.textBaseline = "middle";
|
|
@@ -1003,7 +1003,7 @@ var Canvas = function () {
|
|
|
1003
1003
|
} else {
|
|
1004
1004
|
cellOverflow_bd_r_render = false;
|
|
1005
1005
|
}
|
|
1006
|
-
} else if (((
|
|
1006
|
+
} else if (((_g = dataVerification === null || dataVerification === void 0 ? void 0 : dataVerification["".concat(r, "_").concat(c)]) === null || _g === void 0 ? void 0 : _g.type) === "checkbox") {
|
|
1007
1007
|
var pos_x = startX + offsetLeft;
|
|
1008
1008
|
var pos_y = startY + offsetTop + 1;
|
|
1009
1009
|
renderCtx.save();
|
|
@@ -1064,7 +1064,7 @@ var Canvas = function () {
|
|
|
1064
1064
|
renderCtx.fillText(_.isNil(value) ? "" : value, horizonAlignPos + 18, verticalAlignPos_text);
|
|
1065
1065
|
renderCtx.restore();
|
|
1066
1066
|
} else {
|
|
1067
|
-
if (((
|
|
1067
|
+
if (((_h = checksCF === null || checksCF === void 0 ? void 0 : checksCF.dataBar) === null || _h === void 0 ? void 0 : _h.valueLen) && ((_k = (_j = checksCF === null || checksCF === void 0 ? void 0 : checksCF.dataBar) === null || _j === void 0 ? void 0 : _j.valueLen) === null || _k === void 0 ? void 0 : _k.toString()) !== "NaN") {
|
|
1068
1068
|
var x = startX + offsetLeft + space_width;
|
|
1069
1069
|
var y = startY + offsetTop + space_height;
|
|
1070
1070
|
var w = cellWidth - space_width * 2;
|
|
@@ -1196,7 +1196,7 @@ var Canvas = function () {
|
|
|
1196
1196
|
if (checksCF === null || checksCF === void 0 ? void 0 : checksCF.textColor) {
|
|
1197
1197
|
renderCtx.fillStyle = checksCF.textColor;
|
|
1198
1198
|
}
|
|
1199
|
-
if (((
|
|
1199
|
+
if (((_o = (_m = (_l = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _l === void 0 ? void 0 : _l.fa) === null || _m === void 0 ? void 0 : _m.indexOf("[Red]")) !== null && _o !== void 0 ? _o : -1) > -1 && ((_p = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _p === void 0 ? void 0 : _p.t) === "n" && (cell === null || cell === void 0 ? void 0 : cell.v) < 0) {
|
|
1200
1200
|
renderCtx.fillStyle = "#ff0000";
|
|
1201
1201
|
}
|
|
1202
1202
|
var sheetId = this.sheetCtx.currentSheetId;
|
|
@@ -1239,7 +1239,7 @@ var Canvas = function () {
|
|
|
1239
1239
|
renderCtx.stroke();
|
|
1240
1240
|
renderCtx.closePath();
|
|
1241
1241
|
}
|
|
1242
|
-
(
|
|
1242
|
+
(_r = (_q = this.sheetCtx.hooks).afterRenderCell) === null || _r === void 0 ? void 0 : _r.call(_q, (_s = flowdata[r]) === null || _s === void 0 ? void 0 : _s[c], {
|
|
1243
1243
|
row: r,
|
|
1244
1244
|
column: c,
|
|
1245
1245
|
startX: cellsize[0],
|
package/lib/canvas.js
CHANGED
|
@@ -862,7 +862,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
862
862
|
}, renderCtx);
|
|
863
863
|
};
|
|
864
864
|
Canvas.prototype.cellRender = function (r, c, startY, startX, endY, endX, value, renderCtx, afCompute, cfCompute, offsetLeft, offsetTop, dynamicArrayCompute, cellOverflowMap, colStart, colEnd, scrollHeight, scrollWidth, bodrder05, isMerge) {
|
|
865
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
865
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
866
866
|
if (isMerge === void 0) {
|
|
867
867
|
isMerge = false;
|
|
868
868
|
}
|
|
@@ -952,7 +952,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
952
952
|
renderCtx.fill();
|
|
953
953
|
}
|
|
954
954
|
var text = optionValue_1[i];
|
|
955
|
-
var fontSize = (cell === null || cell === void 0 ? void 0 : cell.fs) * this_1.sheetCtx.zoomRatio;
|
|
955
|
+
var fontSize = ((_f = cell === null || cell === void 0 ? void 0 : cell.fs) !== null && _f !== void 0 ? _f : 13) * this_1.sheetCtx.zoomRatio;
|
|
956
956
|
renderCtx.font = "".concat(fontSize, "px sans-serif");
|
|
957
957
|
renderCtx.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
958
958
|
renderCtx.textBaseline = "middle";
|
|
@@ -1010,7 +1010,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
1010
1010
|
} else {
|
|
1011
1011
|
cellOverflow_bd_r_render = false;
|
|
1012
1012
|
}
|
|
1013
|
-
} else if (((
|
|
1013
|
+
} else if (((_g = dataVerification === null || dataVerification === void 0 ? void 0 : dataVerification["".concat(r, "_").concat(c)]) === null || _g === void 0 ? void 0 : _g.type) === "checkbox") {
|
|
1014
1014
|
var pos_x = startX + offsetLeft;
|
|
1015
1015
|
var pos_y = startY + offsetTop + 1;
|
|
1016
1016
|
renderCtx.save();
|
|
@@ -1071,7 +1071,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
1071
1071
|
renderCtx.fillText(_lodash.default.isNil(value) ? "" : value, horizonAlignPos + 18, verticalAlignPos_text);
|
|
1072
1072
|
renderCtx.restore();
|
|
1073
1073
|
} else {
|
|
1074
|
-
if (((
|
|
1074
|
+
if (((_h = checksCF === null || checksCF === void 0 ? void 0 : checksCF.dataBar) === null || _h === void 0 ? void 0 : _h.valueLen) && ((_k = (_j = checksCF === null || checksCF === void 0 ? void 0 : checksCF.dataBar) === null || _j === void 0 ? void 0 : _j.valueLen) === null || _k === void 0 ? void 0 : _k.toString()) !== "NaN") {
|
|
1075
1075
|
var x = startX + offsetLeft + space_width;
|
|
1076
1076
|
var y = startY + offsetTop + space_height;
|
|
1077
1077
|
var w = cellWidth - space_width * 2;
|
|
@@ -1203,7 +1203,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
1203
1203
|
if (checksCF === null || checksCF === void 0 ? void 0 : checksCF.textColor) {
|
|
1204
1204
|
renderCtx.fillStyle = checksCF.textColor;
|
|
1205
1205
|
}
|
|
1206
|
-
if (((
|
|
1206
|
+
if (((_o = (_m = (_l = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _l === void 0 ? void 0 : _l.fa) === null || _m === void 0 ? void 0 : _m.indexOf("[Red]")) !== null && _o !== void 0 ? _o : -1) > -1 && ((_p = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _p === void 0 ? void 0 : _p.t) === "n" && (cell === null || cell === void 0 ? void 0 : cell.v) < 0) {
|
|
1207
1207
|
renderCtx.fillStyle = "#ff0000";
|
|
1208
1208
|
}
|
|
1209
1209
|
var sheetId = this.sheetCtx.currentSheetId;
|
|
@@ -1246,7 +1246,7 @@ var Canvas = exports.Canvas = function () {
|
|
|
1246
1246
|
renderCtx.stroke();
|
|
1247
1247
|
renderCtx.closePath();
|
|
1248
1248
|
}
|
|
1249
|
-
(
|
|
1249
|
+
(_r = (_q = this.sheetCtx.hooks).afterRenderCell) === null || _r === void 0 ? void 0 : _r.call(_q, (_s = flowdata[r]) === null || _s === void 0 ? void 0 : _s[c], {
|
|
1250
1250
|
row: r,
|
|
1251
1251
|
column: c,
|
|
1252
1252
|
startX: cellsize[0],
|