From d733f336753ab3c99175c525c98d1341a9c5390d Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Wed, 11 Oct 2023 14:42:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data-room-ui/packages/BigScreenDesign/PageDesignTop.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue b/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue index 1bf5b5a1..4f9a5932 100644 --- a/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue +++ b/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue @@ -257,13 +257,13 @@ export default { }) // 找到选中组件内的xy最大最小值 const maxXW = Math.max.apply(Math, activeChartList.map(item => { return item.x + item.w })) + const maxYH = Math.max.apply(Math, activeChartList.map(item => { return item.y + item.h })) let maxX = Math.max.apply(Math, activeChartList.map(item => { return item.x })) + let maxY = Math.max.apply(Math, activeChartList.map(item => { return item.y })) const minX = Math.min.apply(Math, activeChartList.map(item => { return item.x })) - const maxYH = Math.max.apply(Math, activeChartList.map(item => { return item.y + item.h })) - const maxY = Math.max.apply(Math, activeChartList.map(item => { return item.y })) const minY = Math.min.apply(Math, activeChartList.map(item => { return item.y })) const centerW = maxXW - minX - const centerH = maxY - minY + const centerH = maxYH - minY switch (command) { case 'left': activeChartList.forEach((chart) => { @@ -323,6 +323,7 @@ export default { activeChartList = activeChartList.sort(this.compare('y')) // eslint-disable-next-line no-case-declarations const minYH = activeChartList[0].y + activeChartList[0].h + maxY = Math.max.apply(Math, activeChartList.map(item => { return item.y })) // eslint-disable-next-line no-case-declarations let totalH = 0 for (let i = 1; i < activeChartList.length - 1; i++) {