Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(bug): bug
Browse files Browse the repository at this point in the history
bug
  • Loading branch information
wpxp123456 committed Sep 9, 2020
1 parent 4066964 commit 061ea20
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/global/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ function luckysheetextendtable(type, index, value, direction, order) {
d[calc_r][calc_c].f = functionStr;
}

// calc.func[2] = functionStr;

if(direction == "lefttop"){
if(calc_r >= index){
calc.r += value;
Expand All @@ -127,8 +125,6 @@ function luckysheetextendtable(type, index, value, direction, order) {
d[calc_r][calc_c].f = functionStr;
}

// calc.func[2] = functionStr;

if(direction == "lefttop"){
if(calc_c >= index){
calc.c += value;
Expand Down Expand Up @@ -900,8 +896,6 @@ function luckysheetdeletetable(type, st, ed, order) {
d[calc_r][calc_c].f = functionStr;
}

// calc.func[2] = functionStr;

if(calc_r > ed){
calc.r = calc_r - slen;
}
Expand All @@ -917,8 +911,6 @@ function luckysheetdeletetable(type, st, ed, order) {
d[calc_r][calc_c].f = functionStr;
}

// calc.func[2] = functionStr;

if(calc_c > ed){
calc.c = calc_c - slen;
}
Expand Down Expand Up @@ -1545,20 +1537,20 @@ function luckysheetDeleteCell(type, str, edr, stc, edc, order) {
let calc = $.extend(true, {}, calcChain[i]);
let calc_r = calc.r, calc_c = calc.c, calc_i = calc.index, calc_funcStr = getcellFormula(calc_r, calc_c, calc_i);

if((calc_r < str || calc_r > edr) && (calc_c < stc || calc_c > edc)){
if(calc_r < str || calc_r > edr || calc_c < stc || calc_c > edc){
let functionStr;

if(type == 'moveLeft'){
functionStr = "=" + formula.functionStrChange(calc_funcStr, "del", "col", null, stc, clen);

if(calc_c > edc){
if(calc_c > edc && calc_r >= str && calc_r <= edr){
calc.c = calc_c - clen;
}
}
else if(type == 'moveUp'){
functionStr = "=" + formula.functionStrChange(calc_funcStr, "del", "row", null, str, rlen);

if(calc_r > edr){
if(calc_r > edr && calc_c >= stc && calc_c <= edc){
calc.r = calc_r - rlen;
}
}
Expand All @@ -1567,8 +1559,6 @@ function luckysheetDeleteCell(type, str, edr, stc, edc, order) {
d[calc_r][calc_c].f = functionStr;
}

// calc.func[2] = functionStr;

newCalcChain.push(calc);
}
}
Expand Down

0 comments on commit 061ea20

Please sign in to comment.