Skip to content

Commit a2390e2

Browse files
Denis-ShamakinDShamakinw1nklr
authored
fix: Property "setControllerDefaultZoom" does not exist on type "WellLogController" (#2136)
…LogController" Co-authored-by: DShamakin <[email protected]> Co-authored-by: t0oF <[email protected]>
1 parent 888d147 commit a2390e2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ const Template = (args) => {
162162
if (infoRef.current) infoRef.current.innerHTML = info;
163163
};
164164

165-
const [controller, setController] = React.useState(null); // the first WellLog
165+
const [controller, setController] =
166+
React.useState<WellLogController | null>(null); // the first WellLog
166167
const [controllers, setControllers] = React.useState<WellLogController[]>(
167168
[]
168169
); // all WellLogs

typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { getDiscreteMeta, indexOfElementByName } from "./utils/tracks";
3838

3939
import type WellLogView from "./components/WellLogView";
4040
import type {
41+
WellLogController,
4142
WellLogViewOptions,
4243
TrackMouseEvent,
4344
} from "./components/WellLogView";
@@ -118,7 +119,8 @@ const StoryTemplate = (args) => {
118119
const setInfo = function (info) {
119120
if (infoRef.current) infoRef.current.innerHTML = info;
120121
};
121-
const [controller, setController] = React.useState(null);
122+
const [controller, setController] =
123+
React.useState<WellLogController | null>(null);
122124
const onCreateController = React.useCallback(
123125
(controller) => {
124126
setController(controller);

typescript/packages/well-log-viewer/src/components/WellLogView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ export interface WellLogController {
931931
getContentSelection(): [number | undefined, number | undefined]; // [current, pinned]
932932
setContentScale(value: number): void;
933933
getContentScale(): number;
934+
setControllerDefaultZoom(): void;
934935

935936
scrollTrackTo(pos: number): void;
936937
scrollTrackBy(delta: number): void;

0 commit comments

Comments
 (0)