@fileverse-dev/fortune-core 1.2.51-patch-3 → 1.2.51-patch-4

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.
@@ -156,6 +156,7 @@ export function handleCellAreaMouseDown(ctx, globalCache, e, cellInput, containe
156
156
  return;
157
157
  }
158
158
  cellFocus(ctx, row_index, col_index, true);
159
+ editComment(ctx, globalCache, row_index, col_index);
159
160
  if (!inHorizontalFreeze && !inVerticalFreeze) {
160
161
  if (col_pre < ctx.scrollLeft) {
161
162
  ctx.scrollLeft = col_pre;
@@ -196,8 +196,6 @@ export function removeEditingComment(ctx, globalCache) {
196
196
  }
197
197
  export function newComment(ctx, globalCache, r, c) {
198
198
  var _a, _b;
199
- var allowEdit = isAllowEdit(ctx);
200
- if (!allowEdit) return;
201
199
  if (((_b = (_a = ctx.hooks).beforeInsertComment) === null || _b === void 0 ? void 0 : _b.call(_a, r, c)) === false) {
202
200
  return;
203
201
  }
@@ -231,8 +229,6 @@ export function newComment(ctx, globalCache, r, c) {
231
229
  }
232
230
  export function editComment(ctx, globalCache, r, c) {
233
231
  var _a, _b;
234
- var allowEdit = isAllowEdit(ctx);
235
- if (!allowEdit) return;
236
232
  var flowdata = getFlowdata(ctx);
237
233
  var comment = (_b = (_a = flowdata === null || flowdata === void 0 ? void 0 : flowdata[r]) === null || _a === void 0 ? void 0 : _a[c]) === null || _b === void 0 ? void 0 : _b.ps;
238
234
  if (!comment) return;
@@ -175,6 +175,7 @@ function handleCellAreaMouseDown(ctx, globalCache, e, cellInput, container, fxIn
175
175
  return;
176
176
  }
177
177
  (0, _modules.cellFocus)(ctx, row_index, col_index, true);
178
+ (0, _modules.editComment)(ctx, globalCache, row_index, col_index);
178
179
  if (!inHorizontalFreeze && !inVerticalFreeze) {
179
180
  if (col_pre < ctx.scrollLeft) {
180
181
  ctx.scrollLeft = col_pre;
@@ -224,8 +224,6 @@ function removeEditingComment(ctx, globalCache) {
224
224
  }
225
225
  function newComment(ctx, globalCache, r, c) {
226
226
  var _a, _b;
227
- var allowEdit = (0, _utils.isAllowEdit)(ctx);
228
- if (!allowEdit) return;
229
227
  if (((_b = (_a = ctx.hooks).beforeInsertComment) === null || _b === void 0 ? void 0 : _b.call(_a, r, c)) === false) {
230
228
  return;
231
229
  }
@@ -259,8 +257,6 @@ function newComment(ctx, globalCache, r, c) {
259
257
  }
260
258
  function editComment(ctx, globalCache, r, c) {
261
259
  var _a, _b;
262
- var allowEdit = (0, _utils.isAllowEdit)(ctx);
263
- if (!allowEdit) return;
264
260
  var flowdata = (0, _context.getFlowdata)(ctx);
265
261
  var comment = (_b = (_a = flowdata === null || flowdata === void 0 ? void 0 : flowdata[r]) === null || _a === void 0 ? void 0 : _a[c]) === null || _b === void 0 ? void 0 : _b.ps;
266
262
  if (!comment) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.51-patch-3",
3
+ "version": "1.2.51-patch-4",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",