chore: update vueuse

This commit is contained in:
braks
2022-07-27 22:49:00 +02:00
committed by Braks
parent cff5e05ac9
commit 3d22b879a3
3 changed files with 407 additions and 468 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
"vue": "^3.2.25"
},
"dependencies": {
"@vueuse/core": "^8.9.4",
"@vueuse/core": "^9.0.0",
"d3-drag": "^3.0.0",
"d3-selection": "^3.0.0",
"d3-zoom": "^3.0.0"
+2
View File
@@ -5,10 +5,12 @@ import { getNodesInside, isEdgeVisible } from '~/utils'
export default (state: State): ComputedGetters => {
const nodeIds = computed(() => state.nodes.map((n) => n.id))
const edgeIds = computed(() => state.edges.map((e) => e.id))
const getNode: ComputedGetters['getNode'] = computed(() => (id: string) => {
if (state.nodes && !nodeIds.value.length) return state.nodes.find((node) => node.id === id)
return state.nodes[nodeIds.value.indexOf(id)]
})
const getEdge: ComputedGetters['getEdge'] = computed(() => (id: string) => {
if (state.edges && !edgeIds.value.length) return state.edges.find((edge) => edge.id === id)
return state.edges[edgeIds.value.indexOf(id)]
+404 -467
View File
File diff suppressed because it is too large Load Diff