Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph translate event never stops firing after pressing Alt Tab #4459

Closed
blinky1994 opened this issue Oct 1, 2024 · 1 comment
Closed

graph translate event never stops firing after pressing Alt Tab #4459

blinky1994 opened this issue Oct 1, 2024 · 1 comment

Comments

@blinky1994
Copy link

Describe the bug

  1. Subscribe to graph translate event.
    graph.on('translate', () => { console.log('graph is translating'); });

  2. Press Alt + Tab

  3. The event will keep firing and this can be seen in the console logs that keep piling up.
    image

Your Example Website or App

Internal tool which cannot be provided

Steps to Reproduce the Bug or Issue

  1. Subscribe to graph translate event.
    graph.on('translate', () => { console.log('graph is translating'); });

  2. Press Alt + Tab

  3. The event will keep firing and this can be seen in the console logs that keep piling up.
    image

Expected behavior

As a user, I expected the graph translate event to fire only when i am translating the graph even after switching windows using Alt + Tab

Screenshots or Videos

No response

Platform

  • Windows 10 Pro 64-bit 10.0, Build 19045
  • Edge Version 129.0.2792.65 (Official build) (64-bit)
  • Chrome Version 129.0.6668.70 (Official Build) (64-bit)
  • Antv x6 version 2.15.1

Additional context

Bug occurs in both Chrome and Edge, not tested on Safari.

@blinky1994
Copy link
Author

Resolved. It was caused by using RequestAnimationFrames() elsewhere and I just needed to add more checks to prevent this being called every frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@blinky1994 and others