-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Regions whose temporal boundaries are made up of a lot of decimal numbers cause issues for region playing. #3631
Comments
6 digits seems to be the limit (with 7 I still have the bug). As a temporary fix for those who meet this issue, you can add this to your code: wsRegions.on('region-updated', (region) => {
region.setOptions({ start: region.start.toFixed(6), end: region.end.toFixed(6) })
})
wsRegions.on('region-created', (region) => {
region.setOptions({ start: region.start.toFixed(6), end: region.end.toFixed(6) })
}) |
Any idea why this is happening? |
I'm not very comfortable with JavaScript so I will not be very helpful but here is my hypothesis. region.start = 4.12345678 -> when played, a rounding is performed and the cursor is set to 4.123456 which is actually outside of the region so "region-out" is triggered. |
Ah, good guess, thank you! I should probably round it in the other direction. |
I'm having a similar issue. The fix proposed by VaysseRobin sorted most of the region. |
Bug description
When defining a region with a number made up of a lot of decimals, when clicking on a region, the event "region-out" is triggered directly after the "region-clicked".
Environment
Minimal code snippet
Screenshots
bug.mp4
The text was updated successfully, but these errors were encountered: