fix: zoom pan helper
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import { ConnectionLineType, CustomConnectionLine, HandleElement, Node, Position } from '~/types'
|
||||
import { getBezierPath, getSmoothStepPath } from '~/components/Edges/utils'
|
||||
import { Hooks, Store } from '~/context/symbols'
|
||||
import { Hooks, Store } from '~/context'
|
||||
|
||||
interface ConnectionLineProps {
|
||||
sourceNode: Node
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getEdgePositions, getHandle, getSourceTargetNodes, isEdgeVisible } from
|
||||
import { isEdge } from '~/utils/graph'
|
||||
import { ConnectionMode, Dimensions, Edge, EdgeType, Elements, Position, Transform } from '~/types'
|
||||
import { onMouseDown } from '~/components/Handle/utils'
|
||||
import { Hooks, Store } from '~/context/symbols'
|
||||
import { Hooks, Store } from '~/context'
|
||||
|
||||
interface EdgeProps {
|
||||
type: EdgeType
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ElementId, Position } from '~/types'
|
||||
import { onMouseDown, ValidConnectionFunc } from '~/components/Handle/utils'
|
||||
import { Hooks, Store } from '~/context/symbols'
|
||||
import { Hooks, Store } from '~/context'
|
||||
|
||||
interface HandleProps {
|
||||
id?: string
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { getHostForElement } from '~/utils'
|
||||
import { ElementId, ConnectionMode, Connection, HandleType, RevueFlowStore } from '~/types'
|
||||
import { RevueFlowHooks } from '~/hooks/RevueFlowHooks'
|
||||
import { ElementId, ConnectionMode, Connection, HandleType, FlowStore, FlowHooks } from '~/types'
|
||||
|
||||
export type ValidConnectionFunc = (connection: Connection) => boolean
|
||||
|
||||
@@ -71,13 +70,13 @@ function resetRecentHandle(hoveredHandle: Element): void {
|
||||
|
||||
export function onMouseDown(
|
||||
event: MouseEvent,
|
||||
store: RevueFlowStore,
|
||||
store: FlowStore,
|
||||
hooks: {
|
||||
connectStart: RevueFlowHooks['connectStart']
|
||||
connectStop: RevueFlowHooks['connectStop']
|
||||
connectEnd: RevueFlowHooks['connectEnd']
|
||||
connect: RevueFlowHooks['connect']
|
||||
edgeUpdateEnd: RevueFlowHooks['edgeUpdateEnd']
|
||||
connectStart: FlowHooks['connectStart']
|
||||
connectStop: FlowHooks['connectStop']
|
||||
connectEnd: FlowHooks['connectEnd']
|
||||
connect: FlowHooks['connect']
|
||||
edgeUpdateEnd: FlowHooks['edgeUpdateEnd']
|
||||
},
|
||||
handleId: ElementId,
|
||||
nodeId: ElementId,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { DraggableEventListener } from '@braks/revue-draggable'
|
||||
import { Node, NodeDimensionUpdate, NodeType } from '~/types'
|
||||
import { Hooks, Store } from '~/context/symbols'
|
||||
import { Hooks, Store } from '~/context'
|
||||
|
||||
interface NodeProps {
|
||||
node: Node
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { DraggableEventListener } from '@braks/revue-draggable'
|
||||
import { Node } from '~/types'
|
||||
import { isNode } from '~/utils/graph'
|
||||
import { Hooks, Store } from '~/context/symbols'
|
||||
import { Hooks, Store } from '~/context'
|
||||
|
||||
interface NodesSelectionProps {
|
||||
onSelectionDragStart?: (event: MouseEvent, nodes: Node[]) => void
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import SelectionRect from './SelectionRect.vue'
|
||||
import { getMousePosition } from '~/components/UserSelection/utils'
|
||||
import { Store } from '~/context/symbols'
|
||||
import { Store } from '~/context'
|
||||
|
||||
const store = inject(Store)!
|
||||
const el = templateRef('user-selection', null)
|
||||
|
||||
Reference in New Issue
Block a user