From fb8313545655cec9609db968e3b1eb9faba4266b Mon Sep 17 00:00:00 2001 From: Vladimir-Kokin <86053741+Vladimir-Kokin@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:03:07 +0300 Subject: [PATCH] fix: Process initial domain and selection props in WelLogView (#1861) 1) fix initial **domain** and **selection** props processing 2) add **domain** and **selection** props to WellLogViewer storybook example --- .../packages/well-log-viewer/src/WellLogViewer.stories.tsx | 2 ++ .../packages/well-log-viewer/src/components/WellLogView.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx index 6f75777a3..a7d46c4a6 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx @@ -243,6 +243,8 @@ Default.args = { axisTitles: axisTitles, axisMnemos: axisMnemos, viewTitle: true, // show default welllog view title (a wellname from the welllog) + domain: [2500, 4000], + selection: [3500, 3700], options: { hideTrackTitle: false, hideTrackLegend: false, diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx index 75d5dbd53..a76394e91 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx @@ -1254,8 +1254,6 @@ class WellLogView // set callback to component's caller if (this.props.onCreateController) this.props.onCreateController(this); - - this.setControllerZoom(); } componentDidMount(): void { @@ -1462,6 +1460,8 @@ class WellLogView ); addWellPickOverlay(this.logController, this); } + this.setControllerZoom(); + this.setControllerSelection(); this.onTrackScroll(); this.onTrackSelection(); this.setInfo(); // Clear old track information