chore(core): cleanup markers

This commit is contained in:
braks
2023-09-25 12:56:33 +02:00
committed by Braks
parent 2f2036eafc
commit 88882d0875
2 changed files with 12 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ import { computed } from 'vue'
import type { EdgeMarkerType, MarkerProps, MarkerType } from '../../types/edge'
import { useVueFlow } from '../../composables'
import { getMarkerId } from '../../utils'
import Marker from './Marker.vue'
import MarkerSymbols from './MarkerSymbols.vue'
const { id: vueFlowId, edges, connectionLineOptions, defaultMarkerColor: defaultColor } = $(useVueFlow())
@@ -45,7 +45,7 @@ export default {
<template>
<defs>
<Marker
<MarkerSymbols
v-for="marker of markers"
:id="marker.id"
:key="marker.id"

View File

@@ -35,19 +35,24 @@ export default {
>
<polyline
v-if="type === MarkerType.ArrowClosed"
:stroke="color"
:style="{
stroke: color,
fill: color,
strokeWidth,
}"
stroke-linecap="round"
stroke-linejoin="round"
:stroke-width="strokeWidth"
:fill="color"
points="-5,-4 0,0 -5,4 -5,-4"
/>
<polyline
v-if="type === MarkerType.Arrow"
:stroke="color"
:style="{
stroke: color,
strokeWidth,
}"
stroke-linecap="round"
stroke-linejoin="round"
:stroke-width="strokeWidth"
fill="none"
points="-5,-4 0,0 -5,4"
/>