@fileverse-dev/fortune-core 1.1.97 → 1.1.99-patch-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/api/rowcol.js CHANGED
@@ -112,7 +112,6 @@ export function setRowHeight(ctx, rowInfo, options, custom) {
112
112
  throw INVALID_PARAMS;
113
113
  }
114
114
  var sheet = getSheet(ctx, options);
115
- console.log("sheet=======", sheet);
116
115
  var cfg = sheet.config || {};
117
116
  if (cfg.rowlen == null) {
118
117
  cfg.rowlen = {};
package/es/canvas.js CHANGED
@@ -895,7 +895,7 @@ var Canvas = function () {
895
895
  return v.trim();
896
896
  });
897
897
  var rgbArray_1 = [];
898
- for (var i = 0; i < colorValues.length; i += 3) {
898
+ for (var i = 0; i < (colorValues === null || colorValues === void 0 ? void 0 : colorValues.length); i += 3) {
899
899
  rgbArray_1.push(colorValues.slice(i, i + 3).join(", "));
900
900
  }
901
901
  var optionValue_1 = (_e = String(option)) === null || _e === void 0 ? void 0 : _e.split(",");
@@ -1,5 +1,5 @@
1
1
  import { colLocationByIndex, diff, getcellrange, getCellValue, getFlowdata, getRangeByTxt, getSheetIndex, isAllowEdit, isAllowEditReadOnly, iscelldata, isdatetime, isRealNull, isRealNum, jfrefreshgrid, mergeBorder, rowLocationByIndex, setCellValue } from "..";
2
- import { setRowHeight } from "../api";
2
+ import { getRowHeight, setRowHeight } from "../api";
3
3
  export function dataRangeSelection(ctx, cache, rangT, type, value) {
4
4
  var _a, _b;
5
5
  ctx.rangeDialog.show = true;
@@ -630,7 +630,11 @@ export function setDropdownValue(ctx, value, arr) {
630
630
  v: value,
631
631
  pillColor: selectedColor
632
632
  });
633
- setRowHeight(ctx, (_a = {}, _a[String(rowIndex)] = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22, _a));
633
+ var currentRowHeight = getRowHeight(ctx, [rowIndex])[rowIndex];
634
+ var newHeight = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22;
635
+ if (currentRowHeight < newHeight) {
636
+ setRowHeight(ctx, (_a = {}, _a[String(rowIndex)] = newHeight, _a));
637
+ }
634
638
  jfrefreshgrid(ctx, null, undefined);
635
639
  }
636
640
  export function confirmMessage(ctx, generalDialog, dataVerification) {
package/lib/api/rowcol.js CHANGED
@@ -127,7 +127,6 @@ function setRowHeight(ctx, rowInfo, options, custom) {
127
127
  throw _errors.INVALID_PARAMS;
128
128
  }
129
129
  var sheet = (0, _common.getSheet)(ctx, options);
130
- console.log("sheet=======", sheet);
131
130
  var cfg = sheet.config || {};
132
131
  if (cfg.rowlen == null) {
133
132
  cfg.rowlen = {};
package/lib/canvas.js CHANGED
@@ -902,7 +902,7 @@ var Canvas = exports.Canvas = function () {
902
902
  return v.trim();
903
903
  });
904
904
  var rgbArray_1 = [];
905
- for (var i = 0; i < colorValues.length; i += 3) {
905
+ for (var i = 0; i < (colorValues === null || colorValues === void 0 ? void 0 : colorValues.length); i += 3) {
906
906
  rgbArray_1.push(colorValues.slice(i, i + 3).join(", "));
907
907
  }
908
908
  var optionValue_1 = (_e = String(option)) === null || _e === void 0 ? void 0 : _e.split(",");
@@ -645,7 +645,11 @@ function setDropdownValue(ctx, value, arr) {
645
645
  v: value,
646
646
  pillColor: selectedColor
647
647
  });
648
- (0, _api.setRowHeight)(ctx, (_a = {}, _a[String(rowIndex)] = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22, _a));
648
+ var currentRowHeight = (0, _api.getRowHeight)(ctx, [rowIndex])[rowIndex];
649
+ var newHeight = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22;
650
+ if (currentRowHeight < newHeight) {
651
+ (0, _api.setRowHeight)(ctx, (_a = {}, _a[String(rowIndex)] = newHeight, _a));
652
+ }
649
653
  (0, _.jfrefreshgrid)(ctx, null, undefined);
650
654
  }
651
655
  function confirmMessage(ctx, generalDialog, dataVerification) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.1.97",
3
+ "version": "1.1.99-patch-1",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",