fix: 解决Beta中的 scatterGL 在超出轴线最大最小值范围时依旧渲染的问题
This commit is contained in:
parent
164e98dad2
commit
ad2a550668
|
@ -358,6 +358,8 @@ export default {
|
||||||
|
|
||||||
this.emitRangeChange([0, 256, 0, 256])
|
this.emitRangeChange([0, 256, 0, 256])
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击ROI
|
// 点击ROI
|
||||||
|
@ -409,7 +411,8 @@ export default {
|
||||||
|
|
||||||
// 改为不可刷选状态
|
// 改为不可刷选状态
|
||||||
chart.dispatchAction({
|
chart.dispatchAction({
|
||||||
type: 'takeGlobalCursor'
|
type: 'takeGlobalCursor',
|
||||||
|
rushOption: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -436,11 +439,29 @@ export default {
|
||||||
this.emitRangeChange([x1, x2, y1, y2])
|
this.emitRangeChange([x1, x2, y1, y2])
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
|
||||||
|
this.rangeScatter()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clearBrush(chart)
|
this.clearBrush(chart)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 因scatterGL 不受axis中max和min的控制,手动处理溢出部分
|
||||||
|
*/
|
||||||
|
rangeScatter() {
|
||||||
|
const {
|
||||||
|
xAxis: { min: minX, max: maxX },
|
||||||
|
yAxis: { min: minY, max: maxY }
|
||||||
|
} = this.twoDOption
|
||||||
|
|
||||||
|
const data = this.histogramDataList
|
||||||
|
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
|
||||||
|
.map(({ b, g, c }) => [b, g, c])
|
||||||
|
|
||||||
|
this.twoDOption.series.data = data
|
||||||
|
},
|
||||||
|
|
||||||
// 通知上层范围改变
|
// 通知上层范围改变
|
||||||
emitRangeChange(range) {
|
emitRangeChange(range) {
|
||||||
this.$emit('rangeChange', range)
|
this.$emit('rangeChange', range)
|
||||||
|
@ -462,6 +483,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reDrawRect()
|
this.reDrawRect()
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重绘矩形框区域
|
// 重绘矩形框区域
|
||||||
|
@ -705,6 +727,7 @@ export default {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
this.active = 0
|
this.active = 0
|
||||||
this.twoDOption.series.data = newVal.filter(item => item.c).map(item => [item.b, item.g, item.c]) // 设置2D Scatter数据
|
this.twoDOption.series.data = newVal.filter(item => item.c).map(item => [item.b, item.g, item.c]) // 设置2D Scatter数据
|
||||||
|
this.rangeScatter()
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user