chore(core): update d3 type deps
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -807,7 +807,7 @@ export function useActions(
|
||||
|
||||
if (!state.d3Zoom) {
|
||||
until(() => state.d3Zoom)
|
||||
.not.toBeUndefined()
|
||||
.not.toBeNull()
|
||||
.then(setSkippedOptions)
|
||||
} else {
|
||||
setSkippedOptions()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user