From a2390e2283974fcd1dfd57faf47613196941698f Mon Sep 17 00:00:00 2001 From: Denis-Shamakin <160724076+Denis-Shamakin@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:09:58 +0500 Subject: [PATCH] fix: Property "setControllerDefaultZoom" does not exist on type "WellLogController" (#2136) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …LogController" Co-authored-by: DShamakin Co-authored-by: t0oF <93762994+w1nklr@users.noreply.github.com> --- .../packages/well-log-viewer/src/SyncLogViewer.stories.tsx | 3 ++- .../packages/well-log-viewer/src/WellLogViewer.stories.tsx | 4 +++- .../packages/well-log-viewer/src/components/WellLogView.tsx | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx b/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx index 2c9bffaf9..39b4cf881 100644 --- a/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx +++ b/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx @@ -162,7 +162,8 @@ const Template = (args) => { if (infoRef.current) infoRef.current.innerHTML = info; }; - const [controller, setController] = React.useState(null); // the first WellLog + const [controller, setController] = + React.useState(null); // the first WellLog const [controllers, setControllers] = React.useState( [] ); // all WellLogs diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx index 390ce78b6..8a76c903a 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx @@ -38,6 +38,7 @@ import { getDiscreteMeta, indexOfElementByName } from "./utils/tracks"; import type WellLogView from "./components/WellLogView"; import type { + WellLogController, WellLogViewOptions, TrackMouseEvent, } from "./components/WellLogView"; @@ -118,7 +119,8 @@ const StoryTemplate = (args) => { const setInfo = function (info) { if (infoRef.current) infoRef.current.innerHTML = info; }; - const [controller, setController] = React.useState(null); + const [controller, setController] = + React.useState(null); const onCreateController = React.useCallback( (controller) => { setController(controller); diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx index 2f51d7f7f..7357f1367 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx @@ -931,6 +931,7 @@ export interface WellLogController { getContentSelection(): [number | undefined, number | undefined]; // [current, pinned] setContentScale(value: number): void; getContentScale(): number; + setControllerDefaultZoom(): void; scrollTrackTo(pos: number): void; scrollTrackBy(delta: number): void;