VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] 风神brush交互问题

Open skie1997 opened this issue 6 months ago • 2 comments

Version

1.13.11

Link to Minimal Reproduction

aeolus

Steps to Reproduce

null

Current Behavior

  1. 拖动brush,未超过阈值,图表会“闪”

Image

  1. 声明brush后,图元无法交互

Image

  1. 框选后, 点击图表外部, brush不消失

  2. 仪表盘编辑页缩放比例设置为50%,框选时, 鼠标的起点位置不正确

Expected Behavior

上述问题得到解决

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

skie1997 avatar Jun 06 '25 02:06 skie1997

原因分析:

  1. 跟brush交互改造有关,需要调整brush激活状态,当超过阈值时才激活(vrender侧修改)
  2. brush在绘制过程中,会将图元设为不可交互,以保证不触发其他状态。绘制结束后,应该将图元重置为可交互,这一步逻辑出错了(vchart修改)
  3. vrender remove api 使用上有问题,导致brush没有被正确清空(vrender侧修改)
  4. eventpos转换时,没有考虑到stage scale的情况(vrender侧修改)

skie1997 avatar Jun 06 '25 02:06 skie1997

接入后还有这两个问题:

  1. 框选后, 点击图表外部, brush不消失
  2. 仪表盘编辑页缩放比例设置为50%,框选时, 鼠标的起点位置不正确 __VizChart.instance._chart.getAllComponents()[5]._brushComponents[0].stage.eventPointTransform = (e) => { const point = this.global.mapToCanvasPoint(e, this.window); return this.stage.window.pointTransform(point.x, point.y); }

pairone avatar Jun 18 '25 13:06 pairone