Skip to content

Commit

Permalink
Update title after setting tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
mirisb committed Nov 25, 2024
1 parent 773d434 commit b0d4090
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,7 @@ class WellLogView

wellLogSets: WellLogSet[];
container?: HTMLElement;
title?: HTMLElement;
resizeObserver: ResizeObserver;

logController?: LogViewer;
Expand Down Expand Up @@ -1570,6 +1571,7 @@ class WellLogView
this.props.colorMapFunctions
);
addWellPickOverlay(this.logController, this);
this._updateWellLogTitle();
}
this.setControllerZoom();
this.setControllerSelection();
Expand Down Expand Up @@ -1792,6 +1794,11 @@ class WellLogView
element.setAttribute("title", element.textContent);
}
}
_updateWellLogTitle(): void {
if (this.title && this.props.viewTitle === true) {
this.title.textContent = this.wellLogSets[0]?.header.well ?? null;
}
}

scrollTrackBy(delta: number): void {
this.setState((state: Readonly<State>) => ({
Expand Down Expand Up @@ -2082,6 +2089,7 @@ class WellLogView
className={
horizontal ? "title title-horizontal" : "title"
}
ref={(el) => (this.title = el as HTMLElement)}
>
{this.createViewTitle(viewTitle)}
</div>
Expand Down

0 comments on commit b0d4090

Please sign in to comment.