From 11fbf1f8e5996c9b00d6d6f5e8d8635ab902991d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 15 Nov 2021 10:20:08 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1232=20fix=EF=BC=9A=20Chart=20Diagram=20?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=97=B6=E6=82=AC=E6=B5=AE=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/ChartDiagram/diagram.vue | 17 ++++++++--------- .../components/common/project/topologyL5.vue | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue index 4c2aa7d96..5e39300a8 100644 --- a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue +++ b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue @@ -1253,19 +1253,19 @@ export default { const ePosition = window.ePosition const boxWidth = document.getElementsByClassName('page')[0].offsetWidth const boxHeight = document.getElementsByClassName('page')[0].offsetHeight - this.tooltipPosition.left = ePosition.layerX + 20 - this.tooltipPosition.top = ePosition.layerY + this.tooltipPosition.left = ePosition.offsetX + 20 + this.tooltipPosition.top = ePosition.offsetY this.$nextTick(() => { if (this.$refs.topoTooltip) { - if ((boxWidth / 2) > ePosition.layerX) { - this.tooltipPosition.left = ePosition.layerX + 20 + if ((boxWidth / 2) > ePosition.offsetX) { + this.tooltipPosition.left = ePosition.offsetX + 20 } else { - this.tooltipPosition.left = ePosition.layerX - 20 - this.$refs.topoTooltip.offsetWidth + this.tooltipPosition.left = ePosition.offsetX - 20 - this.$refs.topoTooltip.offsetWidth } - if (boxHeight > (ePosition.layerY + this.$refs.topoTooltip.offsetHeight)) { - this.tooltipPosition.top = ePosition.layerY + if (boxHeight > (ePosition.offsetY + this.$refs.topoTooltip.offsetHeight)) { + this.tooltipPosition.top = ePosition.offsetY } else { - this.tooltipPosition.top = ePosition.layerY - this.$refs.topoTooltip.offsetHeight + this.tooltipPosition.top = ePosition.offsetY - this.$refs.topoTooltip.offsetHeight } } if (this.isScreen) { @@ -2020,7 +2020,6 @@ export default { item.animatePlay = item.data.animatePlay item.data.animateType = item.animateType if (item.type === 0 && JSON.stringify(item.data.imageId)) { - item.image = '' item.animateFrames = [] item.animateReady = null delete item.img diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue index d4a9c3662..8b3d1f21c 100644 --- a/nezha-fronted/src/components/common/project/topologyL5.vue +++ b/nezha-fronted/src/components/common/project/topologyL5.vue @@ -2056,7 +2056,6 @@ export default { item.animatePlay = item.data.animatePlay item.data.animateType = item.animateType if (item.type === 0 && JSON.stringify(item.data.imageId)) { - item.image = '' item.animateFrames = [] item.animateReady = null delete item.img