From 40550d6e59c44e0f47e23f8b5fac4c5e79a5c122 Mon Sep 17 00:00:00 2001 From: liuyang Date: Tue, 8 Sep 2020 15:34:04 +0800 Subject: [PATCH] fix(render): render --- src/global/draw.js | 4 ++-- src/global/getRowlen.js | 43 ++++++++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/global/draw.js b/src/global/draw.js index dba093a..3dc866e 100644 --- a/src/global/draw.js +++ b/src/global/draw.js @@ -1178,7 +1178,7 @@ let nullCellRender = function(r, c, start_r, start_c, end_r, end_c,luckysheetTab } -let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckysheetTableContent,af_compute, cf_compute,offsetLeft,offsetTop,dynamicArray_compute,cellOverflowMap, dataset_col_st, dataset_col_ed,scrollHeight,scrollWidth,bodrder05,isMerge){ +let cellRender1 = function(r, c, start_r, start_c, end_r, end_c, value, luckysheetTableContent,af_compute, cf_compute,offsetLeft,offsetTop,dynamicArray_compute,cellOverflowMap, dataset_col_st, dataset_col_ed,scrollHeight,scrollWidth,bodrder05,isMerge){ let cell = Store.flowdata[r][c]; let cellWidth = end_c - start_c - 2; @@ -1600,7 +1600,7 @@ let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckyshee } //非空白单元格渲染 -let cellRender1 = function(r, c, start_r, start_c, end_r, end_c, value, luckysheetTableContent,af_compute, cf_compute,offsetLeft,offsetTop,dynamicArray_compute,cellOverflowMap, dataset_col_st, dataset_col_ed,scrollHeight,scrollWidth,bodrder05,isMerge){ +let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckysheetTableContent,af_compute, cf_compute,offsetLeft,offsetTop,dynamicArray_compute,cellOverflowMap, dataset_col_st, dataset_col_ed,scrollHeight,scrollWidth,bodrder05,isMerge){ let cell = Store.flowdata[r][c]; let cellWidth = end_c - start_c - 2; diff --git a/src/global/getRowlen.js b/src/global/getRowlen.js index e2753f5..8e54887 100644 --- a/src/global/getRowlen.js +++ b/src/global/getRowlen.js @@ -433,7 +433,7 @@ function getCellTextInfo(cell , ctx, option){ text_all_split[splitIndex]= []; } - if(rt!=0){ + if(rt!=0){//rotate if(height>cellHeight){ anchor = i-1; @@ -462,7 +462,7 @@ function getCellTextInfo(cell , ctx, option){ }); } } - else{ + else{//plain if(width>cellWidth){ anchor = i-1; @@ -499,22 +499,27 @@ function getCellTextInfo(cell , ctx, option){ } - // let textH_all_ColumWidth = []; - // for(let i = 0; i < text_all_split.length; i++){ - // let splitLen = text_all_split[i]; - // let col = splitLen[i], colMaxW=0; - - // if(rt!=0){ - - // } - // for(let c=0;c