Skip to content

Commit f870c0d

Browse files
committed
chore(core): cleanup
1 parent 192adab commit f870c0d

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

packages/core/src/composables/useViewport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ export function useViewport(state: State, getters: ComputedGetters) {
228228
}
229229

230230
function transition(selection: D3Selection, ms = 0, onEnd: () => void) {
231-
return selection.transition().duration(ms).on('end', onEnd)
231+
return (selection as any).transition().duration(ms).on('end', onEnd)
232232
}

packages/core/src/container/Viewport/Transform.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { id, viewport, d3Zoom, d3Selection, dimensions } = useVueFlow()
99
1010
const viewportReady = ref(!isClient)
1111
12-
until(() => d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0)
12+
until(() => !!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0))
1313
.toBe(true)
1414
.then(() => {
1515
setTimeout(() => {

packages/core/src/store/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ export function useActions(
807807

808808
if (!state.d3Zoom) {
809809
until(() => state.d3Zoom)
810-
.not.toBeUndefined()
810+
.not.toBeNull()
811811
.then(setSkippedOptions)
812812
} else {
813813
setSkippedOptions()

packages/core/src/types/zoom.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Selection, ZoomBehavior } from 'd3'
1+
import type { Selection } from 'd3-selection'
2+
import type { ZoomBehavior } from 'd3-zoom'
23
import type { Rect, XYPosition } from './flow'
34

45
export type D3Zoom = ZoomBehavior<HTMLDivElement, unknown>

0 commit comments

Comments
 (0)