refactor(types)!: Remove ElementId type
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
ConnectionMode,
|
||||
Dimensions,
|
||||
EdgeComponent,
|
||||
ElementId,
|
||||
GraphEdge,
|
||||
GraphNode,
|
||||
HandleType,
|
||||
@@ -28,9 +27,9 @@ interface EdgeRendererProps {
|
||||
markerEndId?: string
|
||||
elementsSelectable?: boolean
|
||||
edgeUpdaterRadius?: number
|
||||
connectionNodeId?: ElementId
|
||||
connectionNodeId?: string
|
||||
connectionHandleType?: HandleType
|
||||
connectionHandleId?: ElementId
|
||||
connectionHandleId?: string
|
||||
connectionPosition?: XYPosition
|
||||
connectionMode: ConnectionMode
|
||||
nodesConnectable?: boolean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { ElementId, FlowElement, FlowElements, GraphEdge, KeyCode } from '../../types'
|
||||
import { FlowElement, FlowElements, GraphEdge, KeyCode } from '../../types'
|
||||
import { useStore, useKeyPress } from '../../composables'
|
||||
import { getConnectedEdges, isGraphNode } from '../../utils'
|
||||
import NodesSelection from '../../components/NodesSelection/NodesSelection.vue'
|
||||
@@ -44,7 +44,7 @@ tryOnMounted(() => {
|
||||
const connectedEdges = getConnectedEdges(selectedNodes, props.edges)
|
||||
const elementsToRemove = [...props.selectedElements, ...connectedEdges].reduce(
|
||||
(res, item) => res.set(item.id, item),
|
||||
new Map<ElementId, FlowElement>(),
|
||||
new Map<string, FlowElement>(),
|
||||
)
|
||||
|
||||
store.hooks.elementsRemove.trigger(Array.from(elementsToRemove.values()))
|
||||
|
||||
Reference in New Issue
Block a user