update!: graphnode and node typing
* graphnode is a node containing internal Vue Flow data * move util files to util directory * move flow actions type into store file * rename panel type file to zoom * rename types file to flow * Rename Node to NodeWrapper * Rename Edge to EdgeWrapper Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<script lang="ts" setup>
|
||||
import { Draggable, DraggableEventListener } from '@braks/revue-draggable'
|
||||
import { useStore } from '../../composables'
|
||||
import { Node } from '../../types'
|
||||
import { getRectOfNodes, isNode } from '../../utils'
|
||||
import { GraphNode } from '../../types'
|
||||
import { getRectOfNodes, isGraphNode } from '../../utils'
|
||||
|
||||
const store = useStore()
|
||||
|
||||
const selectedNodes = store.selectedElements
|
||||
? store.selectedElements.filter(isNode).map((selectedNode) => {
|
||||
const selectedNodes: GraphNode[] = store.selectedElements
|
||||
? store.selectedElements.filter(isGraphNode).map((selectedNode) => {
|
||||
const matchingNode = store.nodes.find((node) => node.id === selectedNode.id)
|
||||
|
||||
return {
|
||||
...matchingNode,
|
||||
position: matchingNode?.__vf?.position,
|
||||
} as Node
|
||||
} as GraphNode
|
||||
})
|
||||
: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user