@fileverse-dev/fortune-react 1.2.86-pinyin-5 → 1.2.86-pinyin-6
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.
|
@@ -248,13 +248,14 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
248
248
|
return result;
|
|
249
249
|
});
|
|
250
250
|
}, [emitOp]);
|
|
251
|
-
var repaint = function repaint() {
|
|
251
|
+
var repaint = function repaint(context) {
|
|
252
252
|
var _a, _b, _c, _d, _e;
|
|
253
|
-
console.log("repaint is calling");
|
|
253
|
+
console.log("repaint is calling", context, context.config.borderInfo);
|
|
254
254
|
var tableCanvas = new Canvas(refs.canvas.current, context);
|
|
255
255
|
console.log(context.config.borderInfo, "global context");
|
|
256
|
-
|
|
256
|
+
setContext(function (draftCtx) {
|
|
257
257
|
console.log(draftCtx.config.borderInfo, "local context");
|
|
258
|
+
return draftCtx;
|
|
258
259
|
});
|
|
259
260
|
var freeze = (_a = refs.globalCache.freezen) === null || _a === void 0 ? void 0 : _a[sheet.id];
|
|
260
261
|
if (((_b = freeze === null || freeze === void 0 ? void 0 : freeze.horizontal) === null || _b === void 0 ? void 0 : _b.freezenhorizontaldata) || ((_c = freeze === null || freeze === void 0 ? void 0 : freeze.vertical) === null || _c === void 0 ? void 0 : _c.freezenverticaldata)) {
|
|
@@ -386,11 +387,12 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
386
387
|
delete inversedOptions.addSheet.value.data;
|
|
387
388
|
}
|
|
388
389
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
390
|
+
console.log("undo", newContext);
|
|
391
|
+
repaint(newContext);
|
|
389
392
|
return newContext;
|
|
390
393
|
});
|
|
391
|
-
repaint();
|
|
392
394
|
}
|
|
393
|
-
}, [emitOp]);
|
|
395
|
+
}, [emitOp, context, setContext]);
|
|
394
396
|
var handleRedo = useCallback(function () {
|
|
395
397
|
var history = globalCache.current.redoList.pop();
|
|
396
398
|
if (history) {
|
|
@@ -257,13 +257,14 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
257
257
|
return result;
|
|
258
258
|
});
|
|
259
259
|
}, [emitOp]);
|
|
260
|
-
var repaint = function repaint() {
|
|
260
|
+
var repaint = function repaint(context) {
|
|
261
261
|
var _a, _b, _c, _d, _e;
|
|
262
|
-
console.log("repaint is calling");
|
|
262
|
+
console.log("repaint is calling", context, context.config.borderInfo);
|
|
263
263
|
var tableCanvas = new _fortuneCore.Canvas(refs.canvas.current, context);
|
|
264
264
|
console.log(context.config.borderInfo, "global context");
|
|
265
|
-
|
|
265
|
+
setContext(function (draftCtx) {
|
|
266
266
|
console.log(draftCtx.config.borderInfo, "local context");
|
|
267
|
+
return draftCtx;
|
|
267
268
|
});
|
|
268
269
|
var freeze = (_a = refs.globalCache.freezen) === null || _a === void 0 ? void 0 : _a[sheet.id];
|
|
269
270
|
if (((_b = freeze === null || freeze === void 0 ? void 0 : freeze.horizontal) === null || _b === void 0 ? void 0 : _b.freezenhorizontaldata) || ((_c = freeze === null || freeze === void 0 ? void 0 : freeze.vertical) === null || _c === void 0 ? void 0 : _c.freezenverticaldata)) {
|
|
@@ -395,11 +396,12 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
395
396
|
delete inversedOptions.addSheet.value.data;
|
|
396
397
|
}
|
|
397
398
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
399
|
+
console.log("undo", newContext);
|
|
400
|
+
repaint(newContext);
|
|
398
401
|
return newContext;
|
|
399
402
|
});
|
|
400
|
-
repaint();
|
|
401
403
|
}
|
|
402
|
-
}, [emitOp]);
|
|
404
|
+
}, [emitOp, context, setContext]);
|
|
403
405
|
var handleRedo = (0, _react.useCallback)(function () {
|
|
404
406
|
var history = globalCache.current.redoList.pop();
|
|
405
407
|
if (history) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.86-pinyin-
|
|
3
|
+
"version": "1.2.86-pinyin-6",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.2.86-pinyin-
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.86-pinyin-6",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|