From b70a808e1575b93bbe7567fb22a398e4c3193abc Mon Sep 17 00:00:00 2001 From: Ilya Bogdanov Date: Thu, 21 Nov 2024 13:38:04 +0400 Subject: [PATCH] experiment with masks for edges --- .../components/GraphEditor/GraphEdge.vue | 44 ++----------------- .../components/GraphEditor/GraphEdges.vue | 42 ++++++++++++++++++ 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue b/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue index 4069920815..c302ba9400 100644 --- a/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue +++ b/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue @@ -121,20 +121,8 @@ type NodeMask = { } const startsInPort = computed(() => currentJunctionPoints.value?.startsInPort) -const sourceMask = computed(() => { - if (!props.maskSource && !startsInPort.value) return - const nodeRect = sourceNodeRect.value - if (!nodeRect) return - const animProgress = - startsInPort.value ? - (sourceNode.value && graph.nodeHoverAnimations.get(sourceNode.value)) ?? 0 - : 0 - const padding = animProgress * VISIBLE_PORT_MASK_PADDING - if (!props.maskSource && padding === 0) return - const rect = nodeRect.expand(padding) - const radius = 16 + padding - const id = `mask_for_edge_to-${props.edge.target ?? 'unconnected'}` - return { id, rect, radius } +const sourceMaskId = computed(() => { + return `mask_for_edge_from-${connectedSourceNode.value ?? 'unconnected'}` }) const edgeColor = computed(() => @@ -543,33 +531,7 @@ const sourceHoverAnimationStyle = computed(() => {