Limit time tooltip display offset to playable range width #629
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When mouse pointer is hovering over the blocked parts of the progress-bar, the time tool-tip is displayed outside of the progress-bar container.
This PR fixes the alignment of the time tool-tip by limiting the calculated offset to always align tool-tip with the playable range of the media.
Before:
![Screenshot 2024-08-27 at 4 03 51 PM](https://private-user-images.githubusercontent.com/1331659/361957029-29804d15-7328-48cf-b248-320418584e37.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODEzMjcsIm5iZiI6MTczOTI4MTAyNywicGF0aCI6Ii8xMzMxNjU5LzM2MTk1NzAyOS0yOTgwNGQxNS03MzI4LTQ4Y2YtYjI0OC0zMjA0MTg1ODRlMzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTMzNzA3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDNlNjFjNDkyMmUwNzBlNjcwMTRlYTNmYzkzYjFhZWU3NGQyM2UyNTIyYWE5MmY2NWQ4OTVhMzY1YmZkZDQ3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.ILOq_6CAideTQc8rHfKcJ5AL0FqVoejiBJlK8YhmRgg)
After: