fix: back/forward navigation won't reset scroll in timeline (#22838)

* fix: back/forward navigation won't reset scroll in timeline

Fixes a bug where navigating to/from the asser-viewer from timeline causes the scroll position to be reset.

* Fix back after assetviewer next/prev navigation

* Bug fix from review

* review comments
This commit is contained in:
Min Idzelis
2025-10-27 09:56:03 -04:00
committed by GitHub
parent 382481735a
commit c666dc6c67
4 changed files with 117 additions and 64 deletions

View File

@@ -311,12 +311,14 @@ export class MonthGroup {
if (viewerAsset) {
if (!viewerAsset.position) {
console.warn('No position for asset');
break;
return;
}
return this.top + group.top + viewerAsset.position.top + this.timelineManager.headerHeight;
return {
top: this.top + group.top + viewerAsset.position.top + this.timelineManager.headerHeight,
height: viewerAsset.position.height,
};
}
}
return -1;
}
*assetsIterator(options?: { startDayGroup?: DayGroup; startAsset?: TimelineAsset; direction?: Direction }) {

View File

@@ -234,7 +234,6 @@ export class TimelineManager extends VirtualScrollManager {
await this.initTask.reset();
await this.#init(options);
this.updateViewportGeometry(false);
this.#createScrubberMonths();
}
async #init(options: TimelineManagerOptions) {