fix: 【仪表板】非自适应仪表板中,视图操作菜单出现的位置不对

This commit is contained in:
wangjiahao 2021-06-16 17:28:16 +08:00
parent 7feb74d249
commit 63ef5ab3f6

View File

@ -375,8 +375,13 @@ export default {
let left = 0 let left = 0
// //
if (this.curComponent && !target.className.includes('editor')) { if (this.curComponent && !target.className.includes('editor')) {
top = this.curComponent.style.top * this.scaleHeight / 100 + e.offsetY if (this.canvasStyleData.selfAdaption) {
left = this.curComponent.style.left * this.scaleWidth / 100 + e.offsetX top = this.curComponent.style.top * this.scaleHeight / 100 + e.offsetY
left = this.curComponent.style.left * this.scaleWidth / 100 + e.offsetX
} else {
top = this.curComponent.style.top + e.offsetY
left = this.curComponent.style.left + e.offsetX
}
} else { } else {
// //
top = e.offsetY top = e.offsetY