Browse Source

Merge pull request #790 from cdswyda/fix/sheet-scroll-btn

fix(sheetmanage): 修复切换sheet滚动按钮大部分情况始终显示的bug
master
Dushusir 4 years ago
committed by GitHub
parent
commit
088a6ac02b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/controllers/sheetmanage.js

12
src/controllers/sheetmanage.js

@ -1533,14 +1533,12 @@ const sheetmanage = {
this.sheetBarShowAndHide(index);
},
sheetArrowShowAndHide(){
let containerW = $("#luckysheet-sheet-container").width();
const $wrap = $('#luckysheet-sheet-container-c');
if (!$wrap.length) return;
var sw = $wrap[0].scrollWidth;
var w = Math.ceil($wrap.width());
let c_width = 0;
$("#luckysheet-sheet-container-c > div.luckysheet-sheets-item:visible").each(function(){
c_width += $(this).outerWidth();
});
if (c_width >= containerW) {
if (sw > w) {
if(luckysheetConfigsetting.showsheetbarConfig.sheet){
$("#luckysheet-sheet-area .luckysheet-sheets-scroll").css("display", "inline-block");
$("#luckysheet-sheet-container .docs-sheet-fade-left").show();

Loading…
Cancel
Save