diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d96d29a534..5c28dca34480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ - [Table Input Widget is now matched for Table.input method instead of Table.new. Values must be string literals, and their content is parsed to the suitable type][11612]. +- [Visualizations on components are slightly transparent when not + focused][11582]. - [New design for vector-editing widget][11620] [11151]: https://github.com/enso-org/enso/pull/11151 @@ -56,6 +58,7 @@ [11564]: https://github.com/enso-org/enso/pull/11564 [11597]: https://github.com/enso-org/enso/pull/11597 [11612]: https://github.com/enso-org/enso/pull/11612 +[11582]: https://github.com/enso-org/enso/pull/11582 [11620]: https://github.com/enso-org/enso/pull/11620 #### Enso Standard Library diff --git a/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue b/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue index 4069920815eb..d5368c8a8900 100644 --- a/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue +++ b/app/gui/src/project-view/components/GraphEditor/GraphEdge.vue @@ -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 - theme.node.corner_radius, 0) + const sourceMaxXOffset = Math.max(halfSourceSize.x, 0) const attachmentTarget = inputs.targetOffset const targetWellBelowSource = inputs.targetOffset.y >= theme.edge.min_approach_height const targetBelowSource = inputs.targetOffset.y > 0 @@ -388,10 +388,11 @@ function render(sourcePos: Vec2, elements: Element[]): string { const sourceOriginPoint = computed(() => { const source = sourceRect.value if (source == null) return null - const sourceStartPosY = Math.max( - source.top + theme.node.corner_radius, - source.bottom - theme.node.corner_radius, - ) + 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) return new Vec2(source.center().x, sourceStartPosY) }) diff --git a/app/gui/src/project-view/components/GraphEditor/GraphNode.vue b/app/gui/src/project-view/components/GraphEditor/GraphNode.vue index 7b3ac51df49e..5d0e7204b6e1 100644 --- a/app/gui/src/project-view/components/GraphEditor/GraphNode.vue +++ b/app/gui/src/project-view/components/GraphEditor/GraphNode.vue @@ -292,6 +292,7 @@ const dragPointer = usePointer( { pointerCapturedBy: 'target' }, ) const isDragged = computed(() => dragPointer.dragging && significantMove.value) +watch(isDragged, () => graph.db.moveNodeToTop(nodeId.value)) const isRecordingOverridden = computed({ get() { diff --git a/app/gui/src/project-view/components/GraphEditor/GraphVisualization.vue b/app/gui/src/project-view/components/GraphEditor/GraphVisualization.vue index 997d15fb6270..e47fc5a69f5c 100644 --- a/app/gui/src/project-view/components/GraphEditor/GraphVisualization.vue +++ b/app/gui/src/project-view/components/GraphEditor/GraphVisualization.vue @@ -213,7 +213,7 @@ customElements.define(ensoVisualizationHost, defineCustomElement(VisualizationHo