|
@@ -87,6 +87,7 @@ export class VirtualizedViewManager {
|
|
|
|
|
|
// HTML refs that we need to keep track of such
|
|
// HTML refs that we need to keep track of such
|
|
// that rendering can be done programmatically
|
|
// that rendering can be done programmatically
|
|
|
|
+ reset_zoom_button: HTMLButtonElement | null = null;
|
|
divider: HTMLElement | null = null;
|
|
divider: HTMLElement | null = null;
|
|
container: HTMLElement | null = null;
|
|
container: HTMLElement | null = null;
|
|
horizontal_scrollbar_container: HTMLElement | null = null;
|
|
horizontal_scrollbar_container: HTMLElement | null = null;
|
|
@@ -157,6 +158,7 @@ export class VirtualizedViewManager {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ this.registerResetZoomRef = this.registerResetZoomRef.bind(this);
|
|
this.registerContainerRef = this.registerContainerRef.bind(this);
|
|
this.registerContainerRef = this.registerContainerRef.bind(this);
|
|
this.registerHorizontalScrollBarContainerRef =
|
|
this.registerHorizontalScrollBarContainerRef =
|
|
this.registerHorizontalScrollBarContainerRef.bind(this);
|
|
this.registerHorizontalScrollBarContainerRef.bind(this);
|
|
@@ -334,6 +336,10 @@ export class VirtualizedViewManager {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ registerResetZoomRef(ref: HTMLButtonElement | null) {
|
|
|
|
+ this.reset_zoom_button = ref;
|
|
|
|
+ }
|
|
|
|
+
|
|
registerGhostRowRef(column: string, ref: HTMLElement | null) {
|
|
registerGhostRowRef(column: string, ref: HTMLElement | null) {
|
|
if (column === 'list' && ref) {
|
|
if (column === 'list' && ref) {
|
|
const scrollableElement = ref.children[0] as HTMLElement | undefined;
|
|
const scrollableElement = ref.children[0] as HTMLElement | undefined;
|
|
@@ -744,6 +750,7 @@ export class VirtualizedViewManager {
|
|
this.recomputeTimelineIntervals();
|
|
this.recomputeTimelineIntervals();
|
|
this.recomputeSpanToPxMatrix();
|
|
this.recomputeSpanToPxMatrix();
|
|
this.enqueueFOVQueryParamSync();
|
|
this.enqueueFOVQueryParamSync();
|
|
|
|
+ this.syncResetZoomButton();
|
|
}
|
|
}
|
|
|
|
|
|
enqueueFOVQueryParamSync() {
|
|
enqueueFOVQueryParamSync() {
|
|
@@ -777,6 +784,12 @@ export class VirtualizedViewManager {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ syncResetZoomButton() {
|
|
|
|
+ if (!this.reset_zoom_button) return;
|
|
|
|
+ this.reset_zoom_button.disabled =
|
|
|
|
+ this.trace_view.x === 0 && this.trace_view.width === this.trace_space.width;
|
|
|
|
+ }
|
|
|
|
+
|
|
onHorizontalScrollbarScroll(_event: Event) {
|
|
onHorizontalScrollbarScroll(_event: Event) {
|
|
if (!this.scrolling_source) {
|
|
if (!this.scrolling_source) {
|
|
this.scrolling_source = 'fake scrollbar';
|
|
this.scrolling_source = 'fake scrollbar';
|