From 022714f79a37dabc54530c9406e28049cfcb6e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Mon, 15 Nov 2021 10:09:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=B9=E5=99=A8id?= =?UTF-8?q?=E4=B8=8D=E6=98=AFluckysheet=E6=97=B6=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=B7=A5=E5=85=B7=E6=A0=8F=E4=B8=AD=20=E2=80=9C?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E2=80=9D=20=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E5=81=8F=E7=A7=BB=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/resize.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/resize.js b/src/controllers/resize.js index f3eed0e..79c801d 100644 --- a/src/controllers/resize.js +++ b/src/controllers/resize.js @@ -167,7 +167,8 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) { //When resize, change the width of the more button container in real time $$('#luckysheet-icon-morebtn-div').style.left = '';//reset - const containerLeft = $$('#luckysheet').getBoundingClientRect ? $$('#luckysheet').getBoundingClientRect().left : 0; + // *这里计算containerLeft的作用是:获得容器左侧的margin值,以让点击出现的“更多按钮”栏位置不会出错。 + const containerLeft = $$(`#${Store.container}`).getBoundingClientRect ? $$(`#${Store.container}`).getBoundingClientRect().left : 0; const morebtnLeft = $$('#luckysheet-icon-morebtn-div').getBoundingClientRect().left;//get real left info if(morebtnLeft < containerLeft){