From 239b07e16a72a0faae0886253b5e03f0bb73fe22 Mon Sep 17 00:00:00 2001 From: Nils Christian Bonnevie Date: Wed, 20 Sep 2023 13:50:20 +0200 Subject: [PATCH] type fix --- .../packages/subsurface-viewer/src/SubsurfaceViewer.tsx | 5 +++-- typescript/packages/subsurface-viewer/src/components/Map.tsx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx b/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx index 990908b2d..9980732ce 100644 --- a/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx +++ b/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx @@ -14,6 +14,7 @@ import type { colorTablesArray } from "@emerson-eps/color-tables/"; import type { Unit } from "convert-units"; import convert from "convert-units"; import type { PickingInfo } from "@deck.gl/core/typed"; +import type { MjolnirGestureEvent } from "mjolnir.js"; export type { BoundsAccessor, @@ -100,8 +101,8 @@ export interface SubsurfaceViewerProps { */ isLoadedCallback?: (arg: boolean) => void; - onDragStart?: (info: PickingInfo, event: MapMouseEvent) => void; - onDragEnd?: (info: PickingInfo, event: MapMouseEvent) => void; + onDragStart?: (info: PickingInfo, event: MjolnirGestureEvent) => void; + onDragEnd?: (info: PickingInfo, event: MjolnirGestureEvent) => void; /** * If changed will reset camera to default position. diff --git a/typescript/packages/subsurface-viewer/src/components/Map.tsx b/typescript/packages/subsurface-viewer/src/components/Map.tsx index 08861bf97..e8bc3cb4d 100644 --- a/typescript/packages/subsurface-viewer/src/components/Map.tsx +++ b/typescript/packages/subsurface-viewer/src/components/Map.tsx @@ -47,6 +47,7 @@ import { LightingEffect } from "@deck.gl/core/typed"; import { LineLayer } from "@deck.gl/layers/typed"; import { Matrix4 } from "@math.gl/core"; import { fovyToAltitude } from "@math.gl/web-mercator"; +import type { MjolnirGestureEvent } from "mjolnir.js"; /** * 3D bounding box defined as [xmin, ymin, zmin, xmax, ymax, zmax]. @@ -397,8 +398,8 @@ export interface MapProps { */ isLoadedCallback?: (arg: boolean) => void; - onDragStart?: (info: PickingInfo, event: MapMouseEvent) => void; - onDragEnd?: (info: PickingInfo, event: MapMouseEvent) => void; + onDragStart?: (info: PickingInfo, event: MjolnirGestureEvent) => void; + onDragEnd?: (info: PickingInfo, event: MjolnirGestureEvent) => void; /** * If changed will reset camera to default position.