Skip to content

Commit

Permalink
Fix #249
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 11, 2024
1 parent c9a2002 commit f2ce8c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Fix a bug in `geom_edge_parallel()` when used with edge labels. Edges are now
correctly offset, though label may still overlap (#227)
* Fix a bug with auto layout on undirected trees (#247)
* Fix a bug in `get_con()` that would lead to wrong matching of additional data
(#249)

# ggraph 2.1.0

Expand Down
4 changes: 3 additions & 1 deletion R/connections.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ get_con <- function(from = integer(), to = integer(), paths = NULL, ..., weight
)
nodes <- vec_rbind(nodes, extra)
}
extra_data <- lapply(list2(...), rep, length.out = nrow(nodes))
extra_data <- lapply(list2(...), function(x) {
rep(x, length.out = length(from))[nodes$con.id]
})
if (length(extra_data) > 0) {
nodes <- cbind(
nodes,
Expand Down

0 comments on commit f2ce8c7

Please sign in to comment.