Browse Source

协同编辑增加列的bug

master
flowerField 5 years ago
parent
commit
b988b5c52a
  1. 10
      src/controllers/server.js

10
src/controllers/server.js

@ -706,13 +706,13 @@ const server = {
file["column"] += len;
for(let i = 0; i < data.length; i++){
// data[i].splice(st_i, 0, addData[i]);
// 备注:区分插入的位置(可能是左侧插入或者右侧插入)
/* 在每一行的指定位置都插入一列 */
for (let j = 0; j < len; j++) {
if(direction == "lefttop"){
data[i].splice(st_i, 0, addData[i]);
data[i].splice(st_i, 0, addData[j]);
}else{
data[i].splice(st_i + 1, 0, addData[i]);
data[i].splice(st_i + 1, 0, addData[j]);
}
}
}
}

Loading…
Cancel
Save