@fileverse-dev/fortune-core 1.0.84 → 1.0.86
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/events/keyboard.js +4 -7
- package/es/modules/cell.js +10 -10
- package/es/modules/formula.js +2 -2
- package/es/modules/selection.js +2 -2
- package/es/modules/zoom.js +1 -1
- package/lib/events/keyboard.js +3 -5
- package/lib/modules/cell.js +10 -10
- package/lib/modules/formula.js +2 -2
- package/lib/modules/selection.js +2 -2
- package/lib/modules/zoom.js +1 -1
- package/package.json +1 -1
package/es/events/keyboard.js
CHANGED
|
@@ -4,9 +4,8 @@ import { getFlowdata } from "../context";
|
|
|
4
4
|
import { updateCell, cancelNormalSelected } from "../modules/cell";
|
|
5
5
|
import { handleFormulaInput } from "../modules/formula";
|
|
6
6
|
import { copy, deleteSelectedCellText, deleteSelectedCellFormat, textFormat, fillDate, fillTime, moveHighlightCell, moveHighlightRange, selectAll, selectionCache } from "../modules/selection";
|
|
7
|
-
import { cancelPaintModel, handleBold, handleItalic, handleUnderline } from "../modules/toolbar";
|
|
7
|
+
import { cancelPaintModel, handleBold, handleItalic, handleUnderline, handleLink } from "../modules/toolbar";
|
|
8
8
|
import { hasPartMC } from "../modules/validation";
|
|
9
|
-
import { handleLink } from "../modules/toolbar";
|
|
10
9
|
import { getNowDateTime, getSheetIndex, isAllowEdit } from "../utils";
|
|
11
10
|
import { handleCopy } from "./copy";
|
|
12
11
|
import { jfrefreshgrid } from "../modules/refresh";
|
|
@@ -120,7 +119,6 @@ function handleControlPlusArrowKey(ctx, e, shiftPressed) {
|
|
|
120
119
|
}
|
|
121
120
|
export function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo) {
|
|
122
121
|
var _a, _b, _c, _d;
|
|
123
|
-
console.log(e.key, e.code);
|
|
124
122
|
var flowdata = getFlowdata(ctx);
|
|
125
123
|
if (!flowdata) return;
|
|
126
124
|
if (e.shiftKey) {
|
|
@@ -258,7 +256,6 @@ export function handleArrowKey(ctx, e) {
|
|
|
258
256
|
}
|
|
259
257
|
export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, handleRedo, canvas) {
|
|
260
258
|
var _a;
|
|
261
|
-
console.log(e.code);
|
|
262
259
|
if (e.shiftKey && e.code === "Space") {
|
|
263
260
|
e.stopImmediatePropagation();
|
|
264
261
|
e.stopPropagation();
|
|
@@ -272,13 +269,13 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
|
|
|
272
269
|
} else if ((e.ctrlKey || e.metaKey && e.shiftKey) && e.code === "KeyR") {
|
|
273
270
|
textFormat(ctx, "right");
|
|
274
271
|
}
|
|
275
|
-
if ((e.metaKey || e.ctrlKey) && e.code ===
|
|
272
|
+
if ((e.metaKey || e.ctrlKey) && e.code === "KeyK") {
|
|
276
273
|
handleLink(ctx);
|
|
277
274
|
}
|
|
278
|
-
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.code ===
|
|
275
|
+
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.code === "Semicolon") {
|
|
279
276
|
fillDate(ctx);
|
|
280
277
|
}
|
|
281
|
-
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code ===
|
|
278
|
+
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "Semicolon") {
|
|
282
279
|
fillTime(ctx);
|
|
283
280
|
}
|
|
284
281
|
ctx.luckysheet_select_status = false;
|
package/es/modules/cell.js
CHANGED
|
@@ -476,7 +476,7 @@ export function cancelNormalSelected(ctx) {
|
|
|
476
476
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
477
477
|
}
|
|
478
478
|
export function updateCell(ctx, r, c, $input, value, canvas) {
|
|
479
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
479
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
480
480
|
var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
481
481
|
var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
|
|
482
482
|
var flowdata = getFlowdata(ctx);
|
|
@@ -617,10 +617,10 @@ export function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
617
617
|
curv.v = value;
|
|
618
618
|
delete curv.f;
|
|
619
619
|
delete curv.spl;
|
|
620
|
-
var decemialCount_1 = ((_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _f === void 0 ? void 0 : _f.toString().includes(".")) ? (_g = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _g === void 0 ? void 0 : _g.toString().split(" ")[0].split(".")[1].length : 0;
|
|
621
|
-
var coin_1 = (
|
|
620
|
+
var decemialCount_1 = ((_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _f === void 0 ? void 0 : _f.toString().includes(".")) ? (_h = (_g = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _g === void 0 ? void 0 : _g.toString().split(" ")[0].split(".")[1]) === null || _h === void 0 ? void 0 : _h.length : 0;
|
|
621
|
+
var coin_1 = (_j = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _j === void 0 ? void 0 : _j.toString().split(" ")[1];
|
|
622
622
|
if (_typeof(curv) === "object" && (curv === null || curv === void 0 ? void 0 : curv.baseValue)) {
|
|
623
|
-
curv.m = "".concat((parseFloat(value) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount_1), " ").concat(coin_1);
|
|
623
|
+
curv.m = "".concat((parseFloat(value) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount_1 || 2), " ").concat(coin_1);
|
|
624
624
|
curv.baseValue = value;
|
|
625
625
|
}
|
|
626
626
|
execFunctionGroup(ctx, r, c, curv);
|
|
@@ -681,10 +681,10 @@ export function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
681
681
|
isRunExecFunction = false;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
var decemialCount = ((
|
|
685
|
-
var coin = (
|
|
684
|
+
var decemialCount = ((_k = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _k === void 0 ? void 0 : _k.toString().includes(".")) ? (_m = (_l = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _l === void 0 ? void 0 : _l.toString().split(" ")[0].split(".")[1]) === null || _m === void 0 ? void 0 : _m.length : 0;
|
|
685
|
+
var coin = (_o = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _o === void 0 ? void 0 : _o.toString().split(" ")[1];
|
|
686
686
|
if (_typeof(value) === "object" && value.baseValue && !(value === null || value === void 0 ? void 0 : value.m)) {
|
|
687
|
-
value.m = "".concat((parseFloat(value === null || value === void 0 ? void 0 : value.v) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount), " ").concat(coin);
|
|
687
|
+
value.m = "".concat((parseFloat(value === null || value === void 0 ? void 0 : value.v) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount || 2), " ").concat(coin);
|
|
688
688
|
}
|
|
689
689
|
if (typeof value === "string") {
|
|
690
690
|
value = {
|
|
@@ -703,8 +703,8 @@ export function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
703
703
|
if ((curv === null || curv === void 0 ? void 0 : curv.tb) === "2" && curv.v || isInlineStringCell(d[r][c])) {
|
|
704
704
|
var defaultrowlen = ctx.defaultrowlen;
|
|
705
705
|
var cfg = ctx.luckysheetfile[getSheetIndex(ctx, ctx.currentSheetId)].config || {};
|
|
706
|
-
if (!(((
|
|
707
|
-
var cellWidth = ((
|
|
706
|
+
if (!(((_p = cfg.columnlen) === null || _p === void 0 ? void 0 : _p[c]) && ((_q = cfg.rowlen) === null || _q === void 0 ? void 0 : _q[r]))) {
|
|
707
|
+
var cellWidth = ((_r = cfg.columnlen) === null || _r === void 0 ? void 0 : _r[c]) || ctx.defaultcollen;
|
|
708
708
|
var textInfo = canvas ? getCellTextInfo(d[r][c], canvas, ctx, {
|
|
709
709
|
r: r,
|
|
710
710
|
c: c,
|
|
@@ -715,7 +715,7 @@ export function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
715
715
|
currentRowLen = textInfo.textHeightAll + 2;
|
|
716
716
|
}
|
|
717
717
|
var previousRowHeight = getRowHeight(ctx, [r])[r];
|
|
718
|
-
if (currentRowLen > defaultrowlen && !((
|
|
718
|
+
if (currentRowLen > defaultrowlen && !((_s = cfg.customHeight) === null || _s === void 0 ? void 0 : _s[r]) && previousRowHeight < currentRowLen) {
|
|
719
719
|
if (_.isNil(cfg.rowlen)) cfg.rowlen = {};
|
|
720
720
|
cfg.rowlen[r] = currentRowLen;
|
|
721
721
|
}
|
package/es/modules/formula.js
CHANGED
|
@@ -70,7 +70,7 @@ var FormulaCache = function () {
|
|
|
70
70
|
done(v);
|
|
71
71
|
});
|
|
72
72
|
this.parser.on("callRangeValue", function (startCellCoord, endCellCoord, options, done) {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
74
74
|
var context = that.parser.context;
|
|
75
75
|
var id = startCellCoord.sheetName == null ? options.sheetId : getSheetIdByName(context, startCellCoord.sheetName);
|
|
76
76
|
if (id == null) throw Error(ERROR_REF);
|
|
@@ -108,7 +108,7 @@ var FormulaCache = function () {
|
|
|
108
108
|
} else {
|
|
109
109
|
cryptoDenomination = visualString[1];
|
|
110
110
|
}
|
|
111
|
-
cryptoDecimal = visualString[0].includes(".") ? visualString[0].split(".")[1].length : 0;
|
|
111
|
+
cryptoDecimal = visualString[0].includes(".") ? (_h = visualString[0].split(".")[1]) === null || _h === void 0 ? void 0 : _h.length : 0;
|
|
112
112
|
}
|
|
113
113
|
colFragment.push(v);
|
|
114
114
|
}
|
package/es/modules/selection.js
CHANGED
|
@@ -1666,7 +1666,7 @@ export function fillDate(ctx) {
|
|
|
1666
1666
|
for (var r = r1; r <= r2; r += 1) {
|
|
1667
1667
|
for (var c = c1; c <= c2; c += 1) {
|
|
1668
1668
|
var today = new Date();
|
|
1669
|
-
var formattedDate = "".concat(String(today.getDate()).padStart(2,
|
|
1669
|
+
var formattedDate = "".concat(String(today.getDate()).padStart(2, "0"), "/").concat(String(today.getMonth() + 1).padStart(2, "0"), "/").concat(today.getFullYear());
|
|
1670
1670
|
d[r][c] = {
|
|
1671
1671
|
v: formattedDate
|
|
1672
1672
|
};
|
|
@@ -1707,7 +1707,7 @@ export function fillTime(ctx) {
|
|
|
1707
1707
|
for (var r = r1; r <= r2; r += 1) {
|
|
1708
1708
|
for (var c = c1; c <= c2; c += 1) {
|
|
1709
1709
|
var now = new Date();
|
|
1710
|
-
var formattedTime = "".concat(String(now.getHours()).padStart(2,
|
|
1710
|
+
var formattedTime = "".concat(String(now.getHours()).padStart(2, "0"), ":").concat(String(now.getMinutes()).padStart(2, "0"), ":").concat(String(now.getSeconds()).padStart(2, "0"));
|
|
1711
1711
|
d[r][c] = {
|
|
1712
1712
|
v: formattedTime
|
|
1713
1713
|
};
|
package/es/modules/zoom.js
CHANGED
package/lib/events/keyboard.js
CHANGED
|
@@ -129,7 +129,6 @@ function handleControlPlusArrowKey(ctx, e, shiftPressed) {
|
|
|
129
129
|
}
|
|
130
130
|
function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo) {
|
|
131
131
|
var _a, _b, _c, _d;
|
|
132
|
-
console.log(e.key, e.code);
|
|
133
132
|
var flowdata = (0, _context.getFlowdata)(ctx);
|
|
134
133
|
if (!flowdata) return;
|
|
135
134
|
if (e.shiftKey) {
|
|
@@ -267,7 +266,6 @@ function handleArrowKey(ctx, e) {
|
|
|
267
266
|
}
|
|
268
267
|
function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, handleRedo, canvas) {
|
|
269
268
|
var _a;
|
|
270
|
-
console.log(e.code);
|
|
271
269
|
if (e.shiftKey && e.code === "Space") {
|
|
272
270
|
e.stopImmediatePropagation();
|
|
273
271
|
e.stopPropagation();
|
|
@@ -281,13 +279,13 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
281
279
|
} else if ((e.ctrlKey || e.metaKey && e.shiftKey) && e.code === "KeyR") {
|
|
282
280
|
(0, _selection.textFormat)(ctx, "right");
|
|
283
281
|
}
|
|
284
|
-
if ((e.metaKey || e.ctrlKey) && e.code ===
|
|
282
|
+
if ((e.metaKey || e.ctrlKey) && e.code === "KeyK") {
|
|
285
283
|
(0, _toolbar.handleLink)(ctx);
|
|
286
284
|
}
|
|
287
|
-
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.code ===
|
|
285
|
+
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.code === "Semicolon") {
|
|
288
286
|
(0, _selection.fillDate)(ctx);
|
|
289
287
|
}
|
|
290
|
-
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code ===
|
|
288
|
+
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "Semicolon") {
|
|
291
289
|
(0, _selection.fillTime)(ctx);
|
|
292
290
|
}
|
|
293
291
|
ctx.luckysheet_select_status = false;
|
package/lib/modules/cell.js
CHANGED
|
@@ -506,7 +506,7 @@ function cancelNormalSelected(ctx) {
|
|
|
506
506
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
507
507
|
}
|
|
508
508
|
function updateCell(ctx, r, c, $input, value, canvas) {
|
|
509
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
509
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
510
510
|
var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
511
511
|
var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
|
|
512
512
|
var flowdata = (0, _context.getFlowdata)(ctx);
|
|
@@ -647,10 +647,10 @@ function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
647
647
|
curv.v = value;
|
|
648
648
|
delete curv.f;
|
|
649
649
|
delete curv.spl;
|
|
650
|
-
var decemialCount_1 = ((_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _f === void 0 ? void 0 : _f.toString().includes(".")) ? (_g = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _g === void 0 ? void 0 : _g.toString().split(" ")[0].split(".")[1].length : 0;
|
|
651
|
-
var coin_1 = (
|
|
650
|
+
var decemialCount_1 = ((_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _f === void 0 ? void 0 : _f.toString().includes(".")) ? (_h = (_g = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _g === void 0 ? void 0 : _g.toString().split(" ")[0].split(".")[1]) === null || _h === void 0 ? void 0 : _h.length : 0;
|
|
651
|
+
var coin_1 = (_j = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _j === void 0 ? void 0 : _j.toString().split(" ")[1];
|
|
652
652
|
if (_typeof(curv) === "object" && (curv === null || curv === void 0 ? void 0 : curv.baseValue)) {
|
|
653
|
-
curv.m = "".concat((parseFloat(value) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount_1), " ").concat(coin_1);
|
|
653
|
+
curv.m = "".concat((parseFloat(value) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount_1 || 2), " ").concat(coin_1);
|
|
654
654
|
curv.baseValue = value;
|
|
655
655
|
}
|
|
656
656
|
(0, _formula.execFunctionGroup)(ctx, r, c, curv);
|
|
@@ -711,10 +711,10 @@ function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
711
711
|
isRunExecFunction = false;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
var decemialCount = ((
|
|
715
|
-
var coin = (
|
|
714
|
+
var decemialCount = ((_k = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _k === void 0 ? void 0 : _k.toString().includes(".")) ? (_m = (_l = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _l === void 0 ? void 0 : _l.toString().split(" ")[0].split(".")[1]) === null || _m === void 0 ? void 0 : _m.length : 0;
|
|
715
|
+
var coin = (_o = oldValue === null || oldValue === void 0 ? void 0 : oldValue.m) === null || _o === void 0 ? void 0 : _o.toString().split(" ")[1];
|
|
716
716
|
if (_typeof(value) === "object" && value.baseValue && !(value === null || value === void 0 ? void 0 : value.m)) {
|
|
717
|
-
value.m = "".concat((parseFloat(value === null || value === void 0 ? void 0 : value.v) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount), " ").concat(coin);
|
|
717
|
+
value.m = "".concat((parseFloat(value === null || value === void 0 ? void 0 : value.v) / (oldValue === null || oldValue === void 0 ? void 0 : oldValue.baseCurrencyPrice)).toFixed(decemialCount || 2), " ").concat(coin);
|
|
718
718
|
}
|
|
719
719
|
if (typeof value === "string") {
|
|
720
720
|
value = {
|
|
@@ -733,8 +733,8 @@ function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
733
733
|
if ((curv === null || curv === void 0 ? void 0 : curv.tb) === "2" && curv.v || (0, _inlineString.isInlineStringCell)(d[r][c])) {
|
|
734
734
|
var defaultrowlen = ctx.defaultrowlen;
|
|
735
735
|
var cfg = ctx.luckysheetfile[(0, _utils.getSheetIndex)(ctx, ctx.currentSheetId)].config || {};
|
|
736
|
-
if (!(((
|
|
737
|
-
var cellWidth = ((
|
|
736
|
+
if (!(((_p = cfg.columnlen) === null || _p === void 0 ? void 0 : _p[c]) && ((_q = cfg.rowlen) === null || _q === void 0 ? void 0 : _q[r]))) {
|
|
737
|
+
var cellWidth = ((_r = cfg.columnlen) === null || _r === void 0 ? void 0 : _r[c]) || ctx.defaultcollen;
|
|
738
738
|
var textInfo = canvas ? (0, _text.getCellTextInfo)(d[r][c], canvas, ctx, {
|
|
739
739
|
r: r,
|
|
740
740
|
c: c,
|
|
@@ -745,7 +745,7 @@ function updateCell(ctx, r, c, $input, value, canvas) {
|
|
|
745
745
|
currentRowLen = textInfo.textHeightAll + 2;
|
|
746
746
|
}
|
|
747
747
|
var previousRowHeight = (0, _api.getRowHeight)(ctx, [r])[r];
|
|
748
|
-
if (currentRowLen > defaultrowlen && !((
|
|
748
|
+
if (currentRowLen > defaultrowlen && !((_s = cfg.customHeight) === null || _s === void 0 ? void 0 : _s[r]) && previousRowHeight < currentRowLen) {
|
|
749
749
|
if (_lodash.default.isNil(cfg.rowlen)) cfg.rowlen = {};
|
|
750
750
|
cfg.rowlen[r] = currentRowLen;
|
|
751
751
|
}
|
package/lib/modules/formula.js
CHANGED
|
@@ -100,7 +100,7 @@ var FormulaCache = exports.FormulaCache = function () {
|
|
|
100
100
|
done(v);
|
|
101
101
|
});
|
|
102
102
|
this.parser.on("callRangeValue", function (startCellCoord, endCellCoord, options, done) {
|
|
103
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
104
104
|
var context = that.parser.context;
|
|
105
105
|
var id = startCellCoord.sheetName == null ? options.sheetId : (0, _utils.getSheetIdByName)(context, startCellCoord.sheetName);
|
|
106
106
|
if (id == null) throw Error(_formulaParser.ERROR_REF);
|
|
@@ -138,7 +138,7 @@ var FormulaCache = exports.FormulaCache = function () {
|
|
|
138
138
|
} else {
|
|
139
139
|
cryptoDenomination = visualString[1];
|
|
140
140
|
}
|
|
141
|
-
cryptoDecimal = visualString[0].includes(".") ? visualString[0].split(".")[1].length : 0;
|
|
141
|
+
cryptoDecimal = visualString[0].includes(".") ? (_h = visualString[0].split(".")[1]) === null || _h === void 0 ? void 0 : _h.length : 0;
|
|
142
142
|
}
|
|
143
143
|
colFragment.push(v);
|
|
144
144
|
}
|
package/lib/modules/selection.js
CHANGED
|
@@ -1699,7 +1699,7 @@ function fillDate(ctx) {
|
|
|
1699
1699
|
for (var r = r1; r <= r2; r += 1) {
|
|
1700
1700
|
for (var c = c1; c <= c2; c += 1) {
|
|
1701
1701
|
var today = new Date();
|
|
1702
|
-
var formattedDate = "".concat(String(today.getDate()).padStart(2,
|
|
1702
|
+
var formattedDate = "".concat(String(today.getDate()).padStart(2, "0"), "/").concat(String(today.getMonth() + 1).padStart(2, "0"), "/").concat(today.getFullYear());
|
|
1703
1703
|
d[r][c] = {
|
|
1704
1704
|
v: formattedDate
|
|
1705
1705
|
};
|
|
@@ -1740,7 +1740,7 @@ function fillTime(ctx) {
|
|
|
1740
1740
|
for (var r = r1; r <= r2; r += 1) {
|
|
1741
1741
|
for (var c = c1; c <= c2; c += 1) {
|
|
1742
1742
|
var now = new Date();
|
|
1743
|
-
var formattedTime = "".concat(String(now.getHours()).padStart(2,
|
|
1743
|
+
var formattedTime = "".concat(String(now.getHours()).padStart(2, "0"), ":").concat(String(now.getMinutes()).padStart(2, "0"), ":").concat(String(now.getSeconds()).padStart(2, "0"));
|
|
1744
1744
|
d[r][c] = {
|
|
1745
1745
|
v: formattedTime
|
|
1746
1746
|
};
|
package/lib/modules/zoom.js
CHANGED
|
@@ -9,7 +9,7 @@ var ZOOM_STEP = 0.1;
|
|
|
9
9
|
var MAX_ZOOM_RATIO = exports.MAX_ZOOM_RATIO = 4;
|
|
10
10
|
var MIN_ZOOM_RATIO = exports.MIN_ZOOM_RATIO = 0.1;
|
|
11
11
|
function handleKeydownForZoom(ev, currentZoom) {
|
|
12
|
-
if (!ev.ctrlKey) {
|
|
12
|
+
if (!ev.ctrlKey || ev.altKey) {
|
|
13
13
|
return currentZoom;
|
|
14
14
|
}
|
|
15
15
|
var handled = false;
|