refactor(core): add explicit imports and remove auto-imports

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-25 20:48:26 +02:00
committed by Braks
parent 5a86c7cf1d
commit e3e6a03359
63 changed files with 328 additions and 508 deletions
@@ -1,12 +1,14 @@
import { zoomIdentity } from 'd3-zoom'
import { useVueFlow } from './useVueFlow'
import type { D3Selection, GraphNode, ViewportFunctions } from '~/types'
import { clampPosition, getRectOfNodes, getTransformForBounds, pointToRendererPoint } from '~/utils'
const DEFAULT_PADDING = 0.1
/**
* @deprecated use {@link useVueFlow} instead (all viewport functions are also available in {@link useVueFlow})
*/
export default (vueFlowId?: string): ViewportFunctions => {
export function useZoomPanHelper(vueFlowId?: string): ViewportFunctions {
const { nodes, d3Zoom, d3Selection, dimensions, translateExtent, minZoom, maxZoom, viewport, snapToGrid, snapGrid, getNodes } =
$(useVueFlow({ id: vueFlowId }))