Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(fix): bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiaoge committed Aug 18, 2020
1 parent 9830714 commit 52375dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/controllers/sheetmanage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1064,13 +1066,15 @@ 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);
$("#luckysheet-cols-h-cells_0").css("width", Store.ch_width); //width更新

$("#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++) {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions src/global/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 52375dc

Please sign in to comment.