chore(core): update d3 type deps

This commit is contained in:
braks
2023-10-07 11:39:48 +02:00
committed by Braks
parent 247a037a39
commit b0ffe42007
10 changed files with 41 additions and 185 deletions
+1 -1
View File
@@ -228,5 +228,5 @@ export function useViewport(state: State, getters: ComputedGetters) {
}
function transition(selection: D3Selection, ms = 0, onEnd: () => void) {
return selection.transition().duration(ms).on('end', onEnd)
return (selection as any).transition().duration(ms).on('end', onEnd)
}
@@ -9,7 +9,7 @@ const { id, viewport, d3Zoom, d3Selection, dimensions } = useVueFlow()
const viewportReady = ref(!isClient)
until(() => d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0)
until(() => !!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0))
.toBe(true)
.then(() => {
setTimeout(() => {
+1 -1
View File
@@ -807,7 +807,7 @@ export function useActions(
if (!state.d3Zoom) {
until(() => state.d3Zoom)
.not.toBeUndefined()
.not.toBeNull()
.then(setSkippedOptions)
} else {
setSkippedOptions()
+3 -2
View File
@@ -1,8 +1,9 @@
import type { Selection, ZoomBehavior } from 'd3'
import type { Selection } from 'd3-selection'
import type { ZoomBehavior } from 'd3-zoom'
import type { Rect, XYPosition } from './flow'
export type D3Zoom = ZoomBehavior<HTMLDivElement, unknown>
export type D3Selection = Selection<HTMLDivElement, unknown, any, any>
export type D3Selection = Selection<HTMLDivElement, any, any, any>
export type D3ZoomHandler = (this: HTMLDivElement, event: any, d: unknown) => void
export enum PanOnScrollMode {