feat(web) add scrollbar with timeline information (#658)

- Implement a scrollbar with a timeline similar to Google Photos
- The scrollbar can also be dragged
This commit is contained in:
Alex 2022-09-09 15:55:20 -05:00 committed by GitHub
parent b6d025da09
commit d856b35afc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 194 additions and 69 deletions

View file

@ -4,9 +4,10 @@
*/
export function calculateViewportHeightByNumberOfAsset(assetCount: number, viewportWidth: number) {
const thumbnailHeight = 235;
const thumbnailHeight = 237;
const unwrappedWidth = (3 / 2) * assetCount * thumbnailHeight * (7 / 10);
// const unwrappedWidth = (3 / 2) * assetCount * thumbnailHeight * (7 / 10);
const unwrappedWidth = assetCount * thumbnailHeight;
const rows = Math.ceil(unwrappedWidth / viewportWidth);
const height = rows * thumbnailHeight;
return height;