diff --git a/src/views/chart/ContentEdit/components/EditRule/index.vue b/src/views/chart/ContentEdit/components/EditRule/index.vue index 0dbd527b..21ab7e27 100644 --- a/src/views/chart/ContentEdit/components/EditRule/index.vue +++ b/src/views/chart/ContentEdit/components/EditRule/index.vue @@ -13,7 +13,7 @@ >
-
+
{ return chartEditStore.getEditCanvas.scale }) -// 滚动条拖动的高度 +// 滚动条拖动的宽度 const containerWidth = computed(() => { + return `${window.innerWidth * 2}px` +}) + +// 滚动条拖动的高度 +const containerHeight = computed(() => { return `${height.value * 2}px` }) @@ -203,14 +208,12 @@ watch( (newValue, oldValue) => { if (oldValue !== newValue && chartLayoutStore.getRePositionCanvas) { chartLayoutStore.setItemUnHandle(ChartLayoutStoreEnum.RE_POSITION_CANVAS, false) - handleScroll() - setTimeout(() => { + } + handleScroll() + setTimeout(() => { canvasPosCenter() reDraw() - }, 400) - } else { - reDraw(); - } + }, 400) } ) @@ -337,7 +340,7 @@ window.onKeySpacePressHold = (isHold: boolean) => { .edit-screen-container { position: absolute; - height: v-bind('containerWidth'); + height: v-bind('containerHeight'); top: 0; left: 0; }