NEZ-1232 fix: Chart Diagram 预览时悬浮图表位置有误
This commit is contained in:
@@ -1253,19 +1253,19 @@ export default {
|
|||||||
const ePosition = window.ePosition
|
const ePosition = window.ePosition
|
||||||
const boxWidth = document.getElementsByClassName('page')[0].offsetWidth
|
const boxWidth = document.getElementsByClassName('page')[0].offsetWidth
|
||||||
const boxHeight = document.getElementsByClassName('page')[0].offsetHeight
|
const boxHeight = document.getElementsByClassName('page')[0].offsetHeight
|
||||||
this.tooltipPosition.left = ePosition.layerX + 20
|
this.tooltipPosition.left = ePosition.offsetX + 20
|
||||||
this.tooltipPosition.top = ePosition.layerY
|
this.tooltipPosition.top = ePosition.offsetY
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.topoTooltip) {
|
if (this.$refs.topoTooltip) {
|
||||||
if ((boxWidth / 2) > ePosition.layerX) {
|
if ((boxWidth / 2) > ePosition.offsetX) {
|
||||||
this.tooltipPosition.left = ePosition.layerX + 20
|
this.tooltipPosition.left = ePosition.offsetX + 20
|
||||||
} else {
|
} 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)) {
|
if (boxHeight > (ePosition.offsetY + this.$refs.topoTooltip.offsetHeight)) {
|
||||||
this.tooltipPosition.top = ePosition.layerY
|
this.tooltipPosition.top = ePosition.offsetY
|
||||||
} else {
|
} else {
|
||||||
this.tooltipPosition.top = ePosition.layerY - this.$refs.topoTooltip.offsetHeight
|
this.tooltipPosition.top = ePosition.offsetY - this.$refs.topoTooltip.offsetHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.isScreen) {
|
if (this.isScreen) {
|
||||||
@@ -2020,7 +2020,6 @@ export default {
|
|||||||
item.animatePlay = item.data.animatePlay
|
item.animatePlay = item.data.animatePlay
|
||||||
item.data.animateType = item.animateType
|
item.data.animateType = item.animateType
|
||||||
if (item.type === 0 && JSON.stringify(item.data.imageId)) {
|
if (item.type === 0 && JSON.stringify(item.data.imageId)) {
|
||||||
item.image = ''
|
|
||||||
item.animateFrames = []
|
item.animateFrames = []
|
||||||
item.animateReady = null
|
item.animateReady = null
|
||||||
delete item.img
|
delete item.img
|
||||||
|
|||||||
@@ -2056,7 +2056,6 @@ export default {
|
|||||||
item.animatePlay = item.data.animatePlay
|
item.animatePlay = item.data.animatePlay
|
||||||
item.data.animateType = item.animateType
|
item.data.animateType = item.animateType
|
||||||
if (item.type === 0 && JSON.stringify(item.data.imageId)) {
|
if (item.type === 0 && JSON.stringify(item.data.imageId)) {
|
||||||
item.image = ''
|
|
||||||
item.animateFrames = []
|
item.animateFrames = []
|
||||||
item.animateReady = null
|
item.animateReady = null
|
||||||
delete item.img
|
delete item.img
|
||||||
|
|||||||
Reference in New Issue
Block a user