fix(core): use computed for edge class and style
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -57,6 +57,9 @@ const EdgeWrapper = defineComponent({
|
|||||||
|
|
||||||
const targetNode = $computed(() => findNode(edge.target))
|
const targetNode = $computed(() => findNode(edge.target))
|
||||||
|
|
||||||
|
const edgeClass = $computed(() => (edge.class instanceof Function ? edge.class(edge) : edge.class))
|
||||||
|
const edgeStyle = $computed(() => (edge.style instanceof Function ? edge.style(edge) : edge.style))
|
||||||
|
|
||||||
const { handlePointerDown } = useHandle({
|
const { handlePointerDown } = useHandle({
|
||||||
nodeId,
|
nodeId,
|
||||||
handleId,
|
handleId,
|
||||||
@@ -101,9 +104,6 @@ const EdgeWrapper = defineComponent({
|
|||||||
targetPosition,
|
targetPosition,
|
||||||
)
|
)
|
||||||
|
|
||||||
const edgeClass = edge.class instanceof Function ? edge.class(edge) : edge.class
|
|
||||||
const edgeStyle = edge.style instanceof Function ? edge.style(edge) : edge.style
|
|
||||||
|
|
||||||
return h(
|
return h(
|
||||||
'g',
|
'g',
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user