From d9fb5fe4c48637d2ac947fe8aa21d6a7ccde0264 Mon Sep 17 00:00:00 2001 From: liuyang Date: Fri, 31 Jul 2020 19:20:47 +0800 Subject: [PATCH] fix(fix): fix byg --- src/controllers/sheetMove.js | 2 +- src/global/formula.js | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/controllers/sheetMove.js b/src/controllers/sheetMove.js index 854a4c0..c3c16ab 100644 --- a/src/controllers/sheetMove.js +++ b/src/controllers/sheetMove.js @@ -1786,7 +1786,7 @@ function getNextIndex(direction, focusIndex, strIndex, endIndex) { } if(cellNull.length == 1 && stNull && cellNull[i] == false){ - index = strIndex + i + 1; + index = strIndex + i; break; } else if(cellNull.length > 1){ diff --git a/src/global/formula.js b/src/global/formula.js index c154ba5..67464f3 100644 --- a/src/global/formula.js +++ b/src/global/formula.js @@ -20,7 +20,7 @@ import { luckysheetRangeLast } from './cursorPos'; import { jfrefreshgrid } from './refresh'; // import luckysheet_function from '../function/luckysheet_function'; // import functionlist from '../function/functionlist'; -import { luckysheet_compareWith, luckysheet_getcelldata, luckysheet_indirect_check, luckysheet_indirect_check_return, luckysheet_offset_check } from '../function/func'; +import { luckysheet_compareWith, luckysheet_getarraydata, luckysheet_getcelldata, luckysheet_parseData, luckysheet_getValue, luckysheet_indirect_check, luckysheet_indirect_check_return, luckysheet_offset_check } from '../function/func'; import Store from '../store'; import locale from '../locale/locale'; @@ -4369,11 +4369,6 @@ const luckysheetformula = { } }, checkSpecialFunctionRange: function (function_str, r, c, dynamicArray_compute) { - if (!window.luckysheet_indirect_check) { - window.luckysheet_indirect_check = luckysheet_indirect_check; - window.luckysheet_indirect_check_return = luckysheet_indirect_check_return; - window.luckysheet_offset_check = luckysheet_offset_check; - } if (function_str.substr(0, 20) == "luckysheet_function.") { let funcName = function_str.split(".")[1]; if (funcName != null) { @@ -4429,6 +4424,17 @@ const luckysheetformula = { if (data == null) { data = Store.flowdata; } + + if (!window.luckysheet_compareWith) { + window.luckysheet_compareWith = luckysheet_compareWith; + window.luckysheet_getarraydata = luckysheet_getarraydata; + window.luckysheet_getcelldata = luckysheet_getcelldata; + window.luckysheet_parseData = luckysheet_parseData; + window.luckysheet_getValue = luckysheet_getValue; + window.luckysheet_indirect_check = luckysheet_indirect_check; + window.luckysheet_indirect_check_return = luckysheet_indirect_check_return; + window.luckysheet_offset_check = luckysheet_offset_check; + } _this.execFunctionGroupData = $.extend(true, [], data);