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

Issue with the resizing of segments. #479

Open
vivekd95 opened this issue Mar 2, 2023 · 8 comments
Open

Issue with the resizing of segments. #479

vivekd95 opened this issue Mar 2, 2023 · 8 comments

Comments

@vivekd95
Copy link

vivekd95 commented Mar 2, 2023

Hey I am using peaks v3.0.0-beta.6. While resizing the segments you can see the double sided arrow. Arrow is showing for much greater area than it should. For example, I have attached the screenshotsbelow from your demo overlay segments.

1677757510216
1677757510344

As you can see in the screenshots, my cursor is very far from the start time of segment still cursor is considering that it is on the starting of it and showing me the cursor used in resizing the segment. Can you tell me if there is any way that can be applied to improve this so that the cursor changes into double sided arrow only when i have it on the exact time stamp of start time?

chrisn added a commit that referenced this issue Mar 2, 2023
@chrisn
Copy link
Member

chrisn commented Mar 2, 2023

I think you're right, so I have reduced the tolerance. I could also add an option to set the tolerance, if needed.

@vivekd95
Copy link
Author

vivekd95 commented Mar 3, 2023

Thanks @chrisn for helping out. Appreciate it. So, which version should I use to implement this?

@chrisn
Copy link
Member

chrisn commented Mar 3, 2023

I'll update this issue when a new release is available. But for the time being, I suggest applying the change in 246f793 to your own local copy.

@vivekd95 vivekd95 closed this as completed Mar 9, 2023
@chrisn
Copy link
Member

chrisn commented Mar 11, 2023

v3.0.0-beta.7 is now available in npm

@vivekd95
Copy link
Author

Thanks @chrisn for the help. I think you have not provided the option of changing the value of tolerance via options or something, Right?

@chrisn
Copy link
Member

chrisn commented Mar 13, 2023

Not yet, but it can be added. It should probably be the same as playheadClickTolerance, I'm not sure that we would need a separate tolerance option for resizing segments.

@vivekd95
Copy link
Author

Hi, @chrisn

Continuing this discussion further.
I think we might need it when two segments are aligned as shown in the screenshots attached to the previous comment and we need to resize one of them.

@chrisn chrisn reopened this Jun 14, 2023
@chrisn
Copy link
Member

chrisn commented Jun 15, 2023

The difficulty here is that when two segments are adjacent with no separation between them, the segment being resized may not be the one the user expects. The position of the time label gives an indication, but it's not very clear to the user what's going on. In practice, segments are objects with a z-order and so it's the one at the top of the z-order.

This issue may not be as simple as changing the tolerance for where the double arrow appears. I welcome any thoughts and suggestions!

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

2 participants