Browse Source

Merge pull request #551 from flowerField/master

协同编辑增加列的bug
master
文顶顶 5 years ago
committed by GitHub
parent
commit
57f41e8eb0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      src/controllers/server.js

16
src/controllers/server.js

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

Loading…
Cancel
Save