update: a couple more perfomance related updates
* check for selected value inside Node instead of the wrapping renderer * instead of "parsing" elements just return the current store.elements object * use map funct to find index Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -41,13 +41,18 @@ const type = (edge: TEdge) => {
|
||||
<svg :width="dimensions.width" :height="dimensions.height" class="vue-flow__edges">
|
||||
<MarkerDefinitions :color="props.arrowHeadColor" />
|
||||
<g :transform="transform">
|
||||
<template v-for="edge of store.getEdges" :key="edge.id">
|
||||
<Edge :edge="edge" :type="type(edge)" :marker-end-id="props.markerEndId" :edge-updater-radius="props.edgeUpdaterRadius">
|
||||
<template #default="edgeProps">
|
||||
<slot :name="`edge-${edge.type}`" v-bind="edgeProps"></slot>
|
||||
</template>
|
||||
</Edge>
|
||||
</template>
|
||||
<Edge
|
||||
v-for="edge of store.getEdges"
|
||||
:key="edge.id"
|
||||
:edge="edge"
|
||||
:type="type(edge)"
|
||||
:marker-end-id="props.markerEndId"
|
||||
:edge-updater-radius="props.edgeUpdaterRadius"
|
||||
>
|
||||
<template #default="edgeProps">
|
||||
<slot :name="`edge-${edge.type}`" v-bind="edgeProps"></slot>
|
||||
</template>
|
||||
</Edge>
|
||||
<ConnectionLine
|
||||
v-if="connectionLineVisible && sourceNode"
|
||||
:source-node="sourceNode"
|
||||
|
||||
Reference in New Issue
Block a user