!238 update src/views/chart/ContentEdit/components/EditRule/index.vue.

Merge pull request !238 from zhong/N/A
This commit is contained in:
奔跑的面条 2024-07-01 07:38:21 +00:00 committed by Gitee
commit f603aef022
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -13,7 +13,7 @@
>
</sketch-rule>
<div ref="$app" class="edit-screens" @scroll="handleScroll">
<div ref="$container" class="edit-screen-container" :style="{ width: width * 2 + 'px' }">
<div ref="$container" class="edit-screen-container" :style="{ width: containerWidth }">
<div
ref="refSketchRuleBox"
class="canvas"
@ -62,8 +62,13 @@ const scale = computed(() => {
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;
}