chore: lint

This commit is contained in:
Braks
2022-05-27 23:36:01 +02:00
parent 9cdad4d9fc
commit fe6114c738
3 changed files with 36 additions and 39 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Background, ConnectionMode, Controls, MiniMap, VueFlow, useVueFlow } from '@braks/vue-flow' import { Background, ConnectionMode, Controls, MiniMap, VueFlow, useVueFlow } from '@braks/vue-flow/src/index'
const { onConnect, nodes, edges, addEdges, addNodes } = useVueFlow({ const { onConnect, nodes, edges, addEdges, addNodes } = useVueFlow({
fitViewOnInit: true, fitViewOnInit: true,
+2 -5
View File
@@ -14,9 +14,8 @@ import type {
import { import {
addEdgeToStore, addEdgeToStore,
applyChanges, applyChanges,
createGraphNodes,
connectionExists,
createAdditionChange, createAdditionChange,
createGraphNodes,
createPositionChange, createPositionChange,
createSelectionChange, createSelectionChange,
getDimensions, getDimensions,
@@ -230,9 +229,7 @@ export default (state: State, getters: ComputedGetters): Actions => {
if (missingTarget) console.warn(`[vueflow]: Couldn't create edge for target id: ${edge.target}; edge id: ${edge.id}`) if (missingTarget) console.warn(`[vueflow]: Couldn't create edge for target id: ${edge.target}; edge id: ${edge.id}`)
if (missingTarget || missingSource) return acc if (missingTarget || missingSource) return acc
acc.push( acc.push(createAdditionChange<GraphEdge>(shallowReactive(edge)))
createAdditionChange<GraphEdge>(shallowReactive(edge)),
)
} }
return acc return acc
+2 -2
View File
@@ -2,6 +2,7 @@ import { clampPosition, isGraphEdge, isGraphNode } from './graph'
import type { import type {
CoordinateExtent, CoordinateExtent,
Edge, Edge,
EdgeAddChange,
EdgeChange, EdgeChange,
EdgeSelectionChange, EdgeSelectionChange,
ElementChange, ElementChange,
@@ -11,11 +12,10 @@ import type {
GraphEdge, GraphEdge,
GraphNode, GraphNode,
Node, Node,
NodeAddChange,
NodeChange, NodeChange,
NodePositionChange, NodePositionChange,
NodeSelectionChange, NodeSelectionChange,
NodeAddChange,
EdgeAddChange,
XYPosition, XYPosition,
} from '~/types' } from '~/types'