Browse Source

Merge pull request #89 from inkforze/minor_fixes

Minor fixes
master
wbfsa 5 years ago
committed by GitHub
parent
commit
843110c367
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/controllers/dataVerificationCtrl.js
  2. 9
      src/controllers/formulaBar.js

4
src/controllers/dataVerificationCtrl.js

@ -1,6 +1,6 @@
import { replaceHtml } from '../utils/util';
import formula from '../global/formula';
import { isRealNum } from '../global/validate';
import { isRealNum, isRealNull } from '../global/validate';
import { isdatetime, diff } from '../global/datecontroll';
import { luckysheetrefreshgrid } from '../global/refresh';
import tooltip from '../global/tooltip';
@ -1020,7 +1020,7 @@ const dataVerificationCtrl = {
//数据验证未通过
let cellValue = getcellvalue(r, c, null);
if(cellValue == null || cellValue == ""){
if(isRealNull(cellValue)){
return;
}

9
src/controllers/formulaBar.js

@ -59,13 +59,16 @@ export function formulaBarInitial(){
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
Store.luckysheet_select_save = [{ "row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]], "column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]], "row_focus": Store.luckysheetCellUpdate[0], "column_focus": Store.luckysheetCellUpdate[1] }];
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
$("#luckysheet-functionbox-cell").blur();
//$("#luckysheet-functionbox-cell").blur();
$("#luckysheet-rich-text-editor").focus();
}
event.preventDefault();
}
else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) {
formula.dontupdate();
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
//$("#luckysheet-functionbox-cell").blur();
$("#luckysheet-rich-text-editor").focus();
event.preventDefault();
}
else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) {
@ -224,11 +227,11 @@ export function formulaBarInitial(){
event.stopPropagation();
});
$("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (e) {
$("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (event) {
formula.rangeResize = $(this).data("type");//开始状态resize
formula.rangeResizeIndex = $(this).parent().attr("rangeindex");
let mouse = mouseposition(e.pageX, e.pageY),
let mouse = mouseposition(event.pageX, event.pageY),
scrollLeft = $("#luckysheet-cell-main").scrollLeft(),
scrollTop = $("#luckysheet-cell-main").scrollTop();
let x = mouse[0] + scrollLeft;

Loading…
Cancel
Save