Skip to content

Confusing interplay between sync and lockΒ #1120

@nbelakovski

Description

@nbelakovski

I was implementing the cursor synchronization following the sync-cursor demo and I had some really strange behavior on my charts, like they were "locking up"

I was able to reproduce this in the sync cursor demo with the following steps:

  1. Load the sync-cursor demo
  2. Disable sync
  3. Click inside the CPU plot to lock the cursor
  4. Enable sync
  5. Click inside the CPU plot to unlock the cursor

The other two plots now get a locked cursor while the first plot has it unlocked.

There's other weird behavior that happens with an unsynced cursor lock, like zooming doesn't quite work, but it sort of fixes it (probably because the first click unlocks the cursor in the other two plots while still listening for mouseup in the first plot).

In the example I sort of had to go out of my way to recreate this behavior, but for my implementation it seems like the first mousedown when zooming locks the other cursors. Also, this doesn't happen if I don't call ".sub" on the uplot.sync object (and yet sync still works).

I'm just reporting the issue. Maybe it's worth removing lock: true from the cursor sync demo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions