chore(core): cleanup markers
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
Reference in New Issue
Block a user