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 Jul 30, 2020
1 parent 0aa9b3b commit 7dff640
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/controllers/conditionformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@ const conditionformat = {
"addclass": "luckysheet-newEditorRule-dialog",
"title": conditionformat_Text.newFormatRule,
"content": content,
"botton": `<button id="luckysheet-newConditionRule-dialog-confirm" class="btn btn-primary" data-source="'+source+'">${conditionformat_Text.confirm}</button>
<button id="luckysheet-newConditionRule-dialog-close" class="btn btn-default" data-source="'+source+'">${conditionformat_Text.cancel}</button>`,
"botton": `<button id="luckysheet-newConditionRule-dialog-confirm" class="btn btn-primary" data-source="${source}">${conditionformat_Text.confirm}</button>
<button id="luckysheet-newConditionRule-dialog-close" class="btn btn-default" data-source="${source}">${conditionformat_Text.cancel}</button>`,
"style": "z-index:100003"
}));
let $t = $("#luckysheet-newConditionRule-dialog")
Expand All @@ -1930,16 +1930,16 @@ const conditionformat = {
const conditionformat_Text = locale().conditionformat;

let rule = _this.editorRule.data;
let ruleType = rule["type"], ruleFormat = rule["format"];
let ruleType = rule["type"],
ruleFormat = rule["format"],
conditionName = rule["conditionName"];

let index, type1;
if(ruleType == "dataBar" || ruleType == "colorGradation" || ruleType == "icons"){
index = 0;
type1 = ruleType;
}
else{
let conditionName = rule["conditionName"];

if(conditionName == "greaterThan" || conditionName == "lessThan" || conditionName == "betweenness" || conditionName == "equal" || conditionName == "textContains" || conditionName == "occurrenceDate"){
index = 1;

Expand Down
9 changes: 8 additions & 1 deletion src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3612,6 +3612,10 @@ export default function luckysheetHandler() {
for(let c = copy_c1; c <= copy_c2; c++){
let cell = d[r][c];

if(cell != null && cell.mc != null && cell.mc.rs == null){
continue;
}

let v;
if(cell != null){
if(cell.ct != null && cell.ct.fa.indexOf("w") > -1){
Expand All @@ -3625,6 +3629,10 @@ export default function luckysheetHandler() {
v = "";
}

if(v == null){
v = "";
}

if(cpDataArr[r - copy_r1][c - copy_c1] != v){
isEqual = false;
break;
Expand All @@ -3633,7 +3641,6 @@ export default function luckysheetHandler() {
}
}


const locale_fontjson = locale().fontjson;

if(txtdata.indexOf("luckysheet_copy_action_table") >- 1 && Store.luckysheet_copy_save["copyRange"] != null && Store.luckysheet_copy_save["copyRange"].length > 0 && isEqual){
Expand Down
2 changes: 1 addition & 1 deletion src/css/luckysheet-core.css
Original file line number Diff line number Diff line change
Expand Up @@ -5667,11 +5667,11 @@ fieldset[disabled] a.btn {
margin-bottom: 10px;
}
#luckysheet-modal-dialog-slider-alternateformat .modelbox{
display: inline-block;
width: 36px;
padding: 2px;
border: 2px solid #fff;
box-sizing: border-box;
float: left;
margin-right: 4px;
margin-bottom: 4px;
cursor: pointer;
Expand Down
1 change: 1 addition & 0 deletions src/global/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ function luckysheetDrawMain(scrollWidth, scrollHeight, drawWidth, drawHeight, of

let fontset = luckysheetfontformat(cell);
luckysheetTableContent.font = fontset;
luckysheetTableContent.textBaseline = 'top';

//文本计算 宽度和高度
let cellValueSize = getCellValueSize(cell, value, luckysheetTableContent, cellWidth, cellHeight, space_width, space_height);
Expand Down

0 comments on commit 7dff640

Please sign in to comment.