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 22, 2020
1 parent ad1ac61 commit 735d1c8
Show file tree
Hide file tree
Showing 9 changed files with 427 additions and 194 deletions.
9 changes: 8 additions & 1 deletion src/controllers/postil.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,14 @@ const luckysheetPostil = {
let r = id.split("luckysheet-postil-show_")[1].split("_")[0];
let c = id.split("luckysheet-postil-show_")[1].split("_")[1];

_this.buildPs(r, c, Store.flowdata[r][c].ps);
let cell = Store.flowdata[r][c];

if(cell != null && cell.ps != null){
_this.buildPs(r, c, cell.ps);
}
else{
$("#" + id).hide();
}
});
}
}
Expand Down
16 changes: 10 additions & 6 deletions src/controllers/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,19 @@ function selectTitlesRange(map) {
}

//选区是否重叠
function selectIsOverlap() {
function selectIsOverlap(range) {
if(range == null){
range = Store.luckysheet_select_save;
}

let overlap = false;
let map = {};

for(let s = 0; s < Store.luckysheet_select_save.length; s++){
let str_r = Store.luckysheet_select_save[s].row[0],
end_r = Store.luckysheet_select_save[s].row[1];
let str_c = Store.luckysheet_select_save[s].column[0],
end_c = Store.luckysheet_select_save[s].column[1];
for(let s = 0; s < range.length; s++){
let str_r = range[s].row[0],
end_r = range[s].row[1];
let str_c = range[s].column[0],
end_c = range[s].column[1];

for(let r = str_r; r <= end_r; r++){
for(let c = str_c; c <= end_c; c++){
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const selection = {

Store.luckysheet_selection_range = [];
selectionCopyShow();
Store.luckysheet_copy_save = {};
// Store.luckysheet_copy_save = {};

if (!clipboardData) {
let textarea = $("#luckysheet-copy-content").css("visibility", "hidden");
Expand Down
15 changes: 5 additions & 10 deletions src/controllers/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,17 +714,12 @@ const server = {
multipleRangeShow: function(id, name, r, c) {
let _this = this;

let r2 = Store.luckysheet_select_save[0].row[1],
c2 = Store.luckysheet_select_save[0].column[1];
let r1 = r2 = r;
let c1 = c2 = c;
let row = Store.visibledatarow[r],
row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1],
col = Store.visibledatacolumn[c],
col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];

let row = Store.visibledatarow[r2],
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1],
col = Store.visibledatacolumn[c2],
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];

let margeset = menuButton.mergeborer(Store.flowdata, r1, c1);
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
if(!!margeset){
row = margeset.row[1];
row_pre = margeset.row[0];
Expand Down
22 changes: 10 additions & 12 deletions src/controllers/sheetmanage.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,16 +865,6 @@ const sheetmanage = {
formula.execFunctionGroupData = null;
window.luckysheet_getcelldata_cache = null;

//批注
luckysheetPostil.buildAllPs(Store.flowdata);

//图片
imageCtrl.images = file.images;
imageCtrl.allImagesShow();

//数据验证
dataVerificationCtrl.dataVerification = file.dataVerification;

this.sheetParamRestore(file, Store.flowdata);

if(file["freezen"] == null){
Expand All @@ -887,10 +877,18 @@ const sheetmanage = {
}

rhchInit(Store.flowdata.length, Store.flowdata[0].length);

//批注
luckysheetPostil.buildAllPs(Store.flowdata);

//图片
imageCtrl.images = file.images;
imageCtrl.allImagesShow();

//数据验证
dataVerificationCtrl.dataVerification = file.dataVerification;

createFilterOptions(file["filter_select"], file["filter"]);


},
restoreselect: function() {
let index = this.getSheetIndex(Store.currentSheetIndex);
Expand Down
1 change: 1 addition & 0 deletions src/css/luckysheet-core.css
Original file line number Diff line number Diff line change
Expand Up @@ -7185,4 +7185,5 @@ fieldset[disabled] .btn-danger.focus {
z-index: 1000;
user-select: none;
cursor: default;
white-space: nowrap;
}
Loading

0 comments on commit 735d1c8

Please sign in to comment.