chore(core): lint
This commit is contained in:
@@ -5,7 +5,7 @@ import type { GraphNode, HandleConnectable, NodeComponent, SnapGrid, XYZPosition
|
|||||||
import { NodeId, NodeRef } from '../../context'
|
import { NodeId, NodeRef } from '../../context'
|
||||||
import { getConnectedEdges, getXYZPos, handleNodeClick } from '../../utils'
|
import { getConnectedEdges, getXYZPos, handleNodeClick } from '../../utils'
|
||||||
|
|
||||||
const { id, type, name, draggable, selectable, connectable, snapGrid, ...props } = defineProps<{
|
const { id, type, name, draggable, selectable, connectable, ...props } = defineProps<{
|
||||||
id: string
|
id: string
|
||||||
draggable: boolean
|
draggable: boolean
|
||||||
selectable: boolean
|
selectable: boolean
|
||||||
@@ -20,9 +20,7 @@ const { id, type, name, draggable, selectable, connectable, snapGrid, ...props }
|
|||||||
provide(NodeId, id)
|
provide(NodeId, id)
|
||||||
|
|
||||||
const {
|
const {
|
||||||
nodeExtent,
|
|
||||||
edges,
|
edges,
|
||||||
viewport,
|
|
||||||
noPanClassName,
|
noPanClassName,
|
||||||
selectNodesOnDrag,
|
selectNodesOnDrag,
|
||||||
nodesSelectionActive,
|
nodesSelectionActive,
|
||||||
|
|||||||
@@ -1,27 +1,16 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { NodeWrapper } from '../../components'
|
import { NodeWrapper } from '../../components'
|
||||||
import type { GraphNode, NodeComponent, SnapGrid } from '../../types'
|
import type { GraphNode, HandleConnectable, NodeComponent } from '../../types'
|
||||||
import { useVueFlow } from '../../composables'
|
import { useVueFlow } from '../../composables'
|
||||||
import { Slots } from '../../context'
|
import { Slots } from '../../context'
|
||||||
|
|
||||||
const slots = inject(Slots)
|
const slots = inject(Slots)
|
||||||
|
|
||||||
const {
|
const { nodesDraggable, elementsSelectable, nodesConnectable, getNodes, getNodeTypes, updateNodeDimensions } = $(useVueFlow())
|
||||||
nodesDraggable,
|
|
||||||
elementsSelectable,
|
|
||||||
nodesConnectable,
|
|
||||||
noPanClassName,
|
|
||||||
snapToGrid,
|
|
||||||
snapGrid,
|
|
||||||
getNode,
|
|
||||||
getNodes,
|
|
||||||
getNodeTypes,
|
|
||||||
updateNodeDimensions,
|
|
||||||
} = $(useVueFlow())
|
|
||||||
|
|
||||||
const draggable = (d?: boolean) => (typeof d === 'undefined' ? nodesDraggable : d)
|
const draggable = (d?: boolean) => (typeof d === 'undefined' ? nodesDraggable : d)
|
||||||
const selectable = (s?: boolean) => (typeof s === 'undefined' ? elementsSelectable : s)
|
const selectable = (s?: boolean) => (typeof s === 'undefined' ? elementsSelectable : s)
|
||||||
const connectable = (c?: boolean) => (typeof c === 'undefined' ? nodesConnectable : c)
|
const connectable = (c?: HandleConnectable) => (typeof c === 'undefined' ? nodesConnectable : c)
|
||||||
|
|
||||||
const resizeObserver = ref<ResizeObserver>()
|
const resizeObserver = ref<ResizeObserver>()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user