Browse Source
Merge pull request #790 from cdswyda/fix/sheet-scroll-btn
fix(sheetmanage): 修复切换sheet滚动按钮大部分情况始终显示的bug
master
Dushusir
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
7 deletions
-
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(); |
|
|
|