From c746fdc741a327402750b9aec75e53ef2d109a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Mo=CC=88ller?= Date: Mon, 9 Nov 2020 13:16:33 +0100 Subject: [PATCH] fix type definition for d3-zoom handler --- src/store/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index 36417d4f..263e8b2f 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,6 +1,6 @@ import { createStore, Action, action, Thunk, thunk, computed, Computed } from 'easy-peasy'; import isEqual from 'fast-deep-equal'; -import { Selection as D3Selection, ZoomBehavior, ValueFn } from 'd3'; +import { Selection as D3Selection, ZoomBehavior } from 'd3'; import { zoom, zoomIdentity } from 'd3-zoom'; import { select } from 'd3-selection'; @@ -61,7 +61,7 @@ export interface StoreModel { d3Zoom: ZoomBehavior | null; d3Selection: D3Selection | null; - d3ZoomHandler: ValueFn | undefined; + d3ZoomHandler: ((this: Element, event: any, d: unknown) => void) | undefined; d3Initialised: boolean; minZoom: number; maxZoom: number; @@ -165,7 +165,7 @@ export const storeModel: StoreModel = { d3Zoom: null, d3Selection: null, d3Initialised: false, - d3ZoomHandler: () => {}, + d3ZoomHandler: undefined, minZoom: 0.5, maxZoom: 2, translateExtent: [