Skip to content

画布滚动缩放和节点移动功能异常 #516

@zhibo-wang

Description

@zhibo-wang

Describe the bug

使用了useEffect,graphin画布滚动缩放、鼠标左键按住节点移动,都失效;不使用useEffect,滚动缩放和节点移动都正常。

Your Example Website or App

https://stackblitz.com/edit/stackblitz-starters-eg3h5m?file=src%2FApp.tsx

Steps to Reproduce the Bug or Issue

1.函数组件里使用useEffect,画布滚动缩放、鼠标左键按住节点移动都失效;
2.注释useEffect相关代码,刷新应用,画布滚动缩放、鼠标左键按住节点移动都恢复正常。

Expected behavior

在同一函数组件中,使用useEffect等hooks不影响graphin画布的滚动缩放和节点移动

Screenshots or Videos

No response

Platform

  • OS: [Windows@11]
  • Browser: [Chrome@117.0.5938.89]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions