mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 11:48:29 +08:00
fix: node event with wrong canvasX and canvasY problem, closes: #2027
This commit is contained in:
parent
0f08aac908
commit
4342f72d44
@ -10,6 +10,7 @@
|
||||
- fix: tooltip behavior with shouldBegin problem, closes #2016;
|
||||
- fix: the position of grid plugins when there is something on the top of the canvas, closes: #2012;
|
||||
- fix: fisheye destroy and new problem, closes: #2018;
|
||||
- fix: node event with wrong canvasX and canvasY problem, closes: #2027;
|
||||
- feat: improve the performance on the combos;
|
||||
- feat: hide shapes beside keyShape while zooming.
|
||||
|
||||
|
@ -156,6 +156,11 @@ export default class EventController {
|
||||
// 事件target是触发事件的Shape实例,item是触发事件的item实例
|
||||
evt.target = target;
|
||||
evt.item = item;
|
||||
if (evt.canvasX === evt.x && evt.canvasY === evt.y) {
|
||||
const canvasPoint = graph.getCanvasByPoint(evt.x, evt.y);
|
||||
evt.canvasX = canvasPoint.x;
|
||||
evt.canvasY = canvasPoint.y;
|
||||
}
|
||||
|
||||
// emit('click', evt);
|
||||
graph.emit(eventType, evt);
|
||||
|
Loading…
Reference in New Issue
Block a user