diff --git a/src/controllers/sheetmanage.js b/src/controllers/sheetmanage.js index a634280f6..b6dc21faf 100644 --- a/src/controllers/sheetmanage.js +++ b/src/controllers/sheetmanage.js @@ -22,6 +22,8 @@ import { selectHightlightShow, selectionCopyShow } from './select'; import Store from '../store'; import locale from '../locale/locale'; import { renderChartShow } from '../expendPlugins/chart/plugin'; +import {changeSheetContainerSize} from './resize'; +import {zoomNumberDomBind} from './zoom'; const sheetmanage = { generateRandomSheetIndex: function(prefix) { @@ -1064,6 +1066,7 @@ const sheetmanage = { return ret; }, showSheet: function() { + changeSheetContainerSize(); $("#luckysheet-cell-flow_0").css({ "width": Store.ch_width, "top": "-1px" }); //width更新 $("#luckysheet-sheettable_0").css({ "width": Store.ch_width - 1, "height": Store.rh_height }); $("#luckysheetrowHeader_0").css("height", Store.rh_height); @@ -1071,6 +1074,7 @@ const sheetmanage = { $("#luckysheet-scrollbar-x div").width(Store.ch_width); $("#luckysheet-scrollbar-y div").height(Store.rh_height + Store.columeHeaderHeight-Store.cellMainSrollBarSize-3 ); + zoomNumberDomBind(Store.zoomRatio); }, setCurSheet: function(index) { for (let i = 0; i < Store.luckysheetfile.length; i++) { diff --git a/src/controllers/zoom.js b/src/controllers/zoom.js index 56ba16bf3..03123f3ef 100644 --- a/src/controllers/zoom.js +++ b/src/controllers/zoom.js @@ -143,7 +143,7 @@ function zoomSlierDomBind(ratio){ $("#luckysheet-zoom-cursor").css("left", domPos-4); } -function zoomNumberDomBind(ratio){ +export function zoomNumberDomBind(ratio){ let r = Math.round(ratio*100) + "%"; $("#luckysheet-zoom-ratioText").html(r); zoomSlierDomBind(ratio); diff --git a/src/global/draw.js b/src/global/draw.js index ec11b7e3b..2a2821263 100644 --- a/src/global/draw.js +++ b/src/global/draw.js @@ -2068,14 +2068,6 @@ function getCellOverflowMap(canvas, col_st, col_ed, row_st, row_end){ let data = Store.flowdata; - if(row_st < 0){ - row_st = 0; - } - - if(row_end > data.length - 1){ - row_end = data.length - 1; - } - for(let r = row_st; r <= row_end; r++){ for(let c = 0; c < data[r].length; c++){ let cell = data[r][c];