Skip to content

Commit

Permalink
revert my changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitvakatu committed Nov 20, 2024
1 parent 3fe3a8c commit bda3cea
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/gui/src/project-view/components/GraphEditor/GraphEdge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function junctionPoints(inputs: Inputs): JunctionPoints | null {
const halfSourceSize = inputs.sourceSize?.scale(0.5) ?? Vec2.Zero
// The maximum x-distance from the source (our local coordinate origin) for the point where the
// edge will begin.
const sourceMaxXOffset = Math.max(halfSourceSize.x, 0)
const sourceMaxXOffset = Math.max(halfSourceSize.x - theme.node.corner_radius, 0)
const attachmentTarget = inputs.targetOffset
const targetWellBelowSource = inputs.targetOffset.y >= theme.edge.min_approach_height
const targetBelowSource = inputs.targetOffset.y > 0
Expand Down Expand Up @@ -388,11 +388,10 @@ function render(sourcePos: Vec2, elements: Element[]): string {
const sourceOriginPoint = computed(() => {
const source = sourceRect.value
if (source == null) return null
const target = targetPos.value
const targetAbove = target != null ? target.y < source.bottom : false
const targetAside = target != null ? source.left > target.x || source.right < target.x : false
const offset = targetAside || targetAbove ? theme.node.corner_radius : 0
const sourceStartPosY = Math.max(source.top + offset, source.bottom - offset)
const sourceStartPosY = Math.max(
source.top + theme.node.corner_radius,
source.bottom - theme.node.corner_radius,
)
return new Vec2(source.center().x, sourceStartPosY)
})
Expand Down

0 comments on commit bda3cea

Please sign in to comment.