Skip to content

Commit

Permalink
Source colour on edges, arrow not link.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdunkerley committed Nov 5, 2024
1 parent dcee415 commit 19113c9
Show file tree
Hide file tree
Showing 3 changed files with 8,248 additions and 10,457 deletions.
10 changes: 2 additions & 8 deletions app/gui/src/project-view/components/GraphEditor/GraphEdge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ const sourceMask = computed<NodeMask | undefined>(() => {
const edgeColor = computed(() =>
'color' in props.edge ? props.edge.color
: targetNode.value ? graph.db.getNodeColorStyle(targetNode.value)
: sourceNode.value ? graph.db.getNodeColorStyle(sourceNode.value)
: targetNode.value ? graph.db.getNodeColorStyle(targetNode.value)
: undefined,
)
Expand Down Expand Up @@ -510,13 +510,7 @@ const backwardEdgeArrowTransform = computed<string | undefined>(() => {
})
const targetIsSelfArgument = computed(() => {
if ('targetIsSelfArgument' in props.edge && props.edge?.targetIsSelfArgument) return true
if (!targetExpr.value) return
const nodeId = graph.getPortNodeId(targetExpr.value)
if (!nodeId) return
const primarySubject = graph.db.nodeIdToNode.get(nodeId)?.primarySubject
if (!primarySubject) return
return targetExpr.value === primarySubject
return true
})
const selfArgumentArrowHeight = 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,4 @@ export const widgetDefinition = defineWidget(
}
}
.WidgetPort.isTarget:not(.isSelfArgument):after {
content: '';
position: absolute;
top: -4px;
left: 50%;
width: 4px;
height: 5px;
transform: translate(-50%, 0);
background-color: var(--node-color-port);
z-index: -1;
}
</style>
Loading

0 comments on commit 19113c9

Please sign in to comment.