fix: 自建台站ROI框移动时超出范围的问题
This commit is contained in:
parent
79f47eacb6
commit
6803f4936a
|
@ -548,6 +548,7 @@ export default {
|
|||
handleBoundaryChange(evt) {
|
||||
const { index, start, end } = evt
|
||||
this.$set(this.roiParamList, index, [start, end])
|
||||
this.$refs.betaChartRef.setBoundaryList(cloneDeep(this.roiParamList))
|
||||
},
|
||||
|
||||
// 从分析工具刷新部分数据
|
||||
|
|
|
@ -535,8 +535,18 @@ export default {
|
|||
this.currBoundaryItem.width = nextLeft - this.boundaryRight
|
||||
this.direction = 'right'
|
||||
} else {
|
||||
this.currBoundaryItem.left = nextLeft
|
||||
this.currBoundaryItem.width = nextWidth
|
||||
// 如果将要超出容器左边线
|
||||
if (nextLeft < 0) {
|
||||
this.currBoundaryItem.left = 0
|
||||
this.currBoundaryItem.width = nextWidth + nextLeft
|
||||
this.handleBorderMouseLeave()
|
||||
return
|
||||
}
|
||||
// 设置为将要移动到的位置
|
||||
else {
|
||||
this.currBoundaryItem.left = nextLeft
|
||||
this.currBoundaryItem.width = nextWidth
|
||||
}
|
||||
this.direction = 'left'
|
||||
}
|
||||
}
|
||||
|
@ -549,7 +559,16 @@ export default {
|
|||
this.currBoundaryItem.left = prevLeft + nextWidth
|
||||
this.currBoundaryItem.width = -nextWidth
|
||||
} else {
|
||||
this.currBoundaryItem.width = nextWidth
|
||||
// 如果将要超出容器右边线
|
||||
if (this.currBoundaryItem.left + nextWidth > this.boundaryContainerPosition.width) {
|
||||
this.currBoundaryItem.width = this.boundaryContainerPosition.width - this.currBoundaryItem.left
|
||||
this.handleBorderMouseLeave()
|
||||
return
|
||||
}
|
||||
// 设置为将要移动到的位置
|
||||
else {
|
||||
this.currBoundaryItem.width = nextWidth
|
||||
}
|
||||
this.direction = 'right'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user