Unverified 提交 f3e00351 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #1153 from dataease/pr@v1.4@fix_panel-new-view

fix:【仪表板】排版整齐后,通过新建视图,向仪表板中添加,位置有些错乱
......@@ -187,7 +187,7 @@ const list = [
borderRadius: ''
},
x: 1,
y: 1,
y: 36,
sizex: 10,
sizey: 6,
auxiliaryMatrix: true
......
......@@ -798,9 +798,19 @@ export default {
}
})
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
// position = absolution 或导致有偏移 这里中和一下偏移量
component.style.top = 0
component.style.left = 600
if (this.canvasStyleData.auxiliaryMatrix) {
component.style.left = (component.x - 1) * this.curCanvasScale.matrixStyleOriginWidth
component.style.top = (component.y - 1) * this.curCanvasScale.matrixStyleOriginHeight
component.style.width = component.sizex * this.curCanvasScale.matrixStyleOriginWidth
component.style.height = component.sizey * this.curCanvasScale.matrixStyleOriginHeight
} else {
component.style.left = 0
component.style.top = 0
component.x = 1
component.y = 1
}
component.id = newComponentId
this.$store.commit('addComponent', { component })
this.$store.commit('recordSnapshot', 'newViewInfo')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论