antvis/G6

The event passed to graph.on callback has incorect typing (IG6GraphEvent) #2724

agriniex posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

Edit on CodeSandbox

Steps to reproduce

  1. Use Typescript
  2. Subscribe to keydown or node:mousedown event
  3. Click on a node or press a key
  4. evt.target.isCanvas function is specified as available from type definitions but it is not, since those events are either GraphEvent or KeyboardEvent, but not IG6GraphEvent

image

Environment Info
g6 4.1.16
System -
Browser Any

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests