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

Commit

Permalink
fix(toolbar): menu button style
Browse files Browse the repository at this point in the history
protection button
  • Loading branch information
Dushusir committed Oct 9, 2020
1 parent 4961ac6 commit d18478c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/controllers/resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) {
// #luckysheet-icon-morebtn button width plus right is 83px
if(toobarWidths[index] < gridW - 90){
moreButtonIndex = index;
if(moreButtonIndex !== 33){
if(moreButtonIndex < toobarWidths.length - 1){

ismore = true;
}
Expand Down Expand Up @@ -290,6 +290,8 @@ export function changeSheetContainerSize(gridW, gridH){

/**
* 统计工具栏各个按钮宽度值,用于计算哪些需要放到 更多按钮里
*
* 注意:每增加一个工具栏按钮,都要在toobarWidths和toobarElements这两个数组里加上按钮的统计数据
*/
export function menuToolBarWidth() {
const toobarObject = Store.toobarObject;
Expand Down Expand Up @@ -326,9 +328,9 @@ export function menuToolBarWidth() {
$('#luckysheet-dataVerification-btn-title').offset().left,
$('#luckysheet-splitColumn-btn-title').offset().left,
$('#luckysheet-chart-btn-screenshot').offset().left,
$('#luckysheet-icon-protection').offset().left,
$('#luckysheet-icon-seachmore').offset().left,
$('#luckysheet-icon-seachmore').offset().left + $('#luckysheet-icon-seachmore').outerWidth() + 5,
$('#luckysheet-icon-protection').offset().left,
$('#luckysheet-icon-protection').offset().left + $('#luckysheet-icon-protection').outerWidth() + 5,
];
toobarObject.toobarElements = [
'#luckysheet-icon-undo',
Expand Down

0 comments on commit d18478c

Please sign in to comment.