forked from github/dataease
Merge pull request #10805 from dataease/pr@dev-v2@fix_scale-error
fix(数据大屏): 修复大屏预览右侧有部分空白问题
This commit is contained in:
commit
ccee171ab6
@ -9,7 +9,7 @@ import { storeToRefs } from 'pinia'
|
|||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import UserViewEnlarge from '@/components/visualization/UserViewEnlarge.vue'
|
import UserViewEnlarge from '@/components/visualization/UserViewEnlarge.vue'
|
||||||
import CanvasOptBar from '@/components/visualization/CanvasOptBar.vue'
|
import CanvasOptBar from '@/components/visualization/CanvasOptBar.vue'
|
||||||
import { isMainCanvas } from '@/utils/canvasUtils'
|
import { isDashboard, isMainCanvas } from '@/utils/canvasUtils'
|
||||||
import { activeWatermark } from '@/components/watermark/watermark'
|
import { activeWatermark } from '@/components/watermark/watermark'
|
||||||
import { personInfoApi } from '@/api/user'
|
import { personInfoApi } from '@/api/user'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
@ -153,7 +153,9 @@ const resetLayout = () => {
|
|||||||
let canvasHeight = previewCanvas.value.clientHeight
|
let canvasHeight = previewCanvas.value.clientHeight
|
||||||
scaleWidth.value = Math.floor((canvasWidth * 100) / canvasStyleData.value.width)
|
scaleWidth.value = Math.floor((canvasWidth * 100) / canvasStyleData.value.width)
|
||||||
scaleHeight.value = Math.floor((canvasHeight * 100) / canvasStyleData.value.height)
|
scaleHeight.value = Math.floor((canvasHeight * 100) / canvasStyleData.value.height)
|
||||||
scaleMin.value = Math.min(scaleWidth.value, scaleHeight.value)
|
scaleMin.value = isDashboard()
|
||||||
|
? Math.min(scaleWidth.value, scaleHeight.value)
|
||||||
|
: (canvasWidth * 100) / canvasStyleData.value.width
|
||||||
if (dashboardActive.value) {
|
if (dashboardActive.value) {
|
||||||
cellWidth.value = canvasWidth / pcMatrixCount.value.x
|
cellWidth.value = canvasWidth / pcMatrixCount.value.x
|
||||||
cellHeight.value = canvasHeight / pcMatrixCount.value.y
|
cellHeight.value = canvasHeight / pcMatrixCount.value.y
|
||||||
|
Loading…
Reference in New Issue
Block a user